<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for class.phpmailer.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file class.phpmailer.php</h1>
<p>Documentation is available at <a href="../PHPMailer/_branches_5.0-dev_class_phpmailer_php.html">class.phpmailer.php</a></p>
<div class="src-code">
<pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>
<li><a name="a2"></a><span class="src-comm">/*~ class.phpmailer.php</span></li>
<li><a name="a3"></a><span class="src-comm">.---------------------------------------------------------------------------.</span></li>
<li><a name="a4"></a><span class="src-comm">|  Software: PHPMailer - PHP email class                                    |</span></li>
<li><a name="a5"></a><span class="src-comm">|   Version: 5.0.0                                                          |</span></li>
<li><a name="a6"></a><span class="src-comm">|   Contact: via sourceforge.net support pages (also www.codeworxtech.com)  |</span></li>
<li><a name="a7"></a><span class="src-comm">|      Info: http://phpmailer.sourceforge.net                               |</span></li>
<li><a name="a8"></a><span class="src-comm">|   Support: http://sourceforge.net/projects/phpmailer/                     |</span></li>
<li><a name="a9"></a><span class="src-comm">| ------------------------------------------------------------------------- |</span></li>
<li><a name="a10"></a><span class="src-comm">|     Admin: Andy Prevost (project admininistrator)                         |</span></li>
<li><a name="a11"></a><span class="src-comm">|   Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |</span></li>
<li><a name="a12"></a><span class="src-comm">|          : Marcus Bointon (coolbru) coolbru@users.sourceforge.net         |</span></li>
<li><a name="a13"></a><span class="src-comm">|   Founder: Brent R. Matzelle (original founder)                           |</span></li>
<li><a name="a14"></a><span class="src-comm">| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved.               |</span></li>
<li><a name="a15"></a><span class="src-comm">| Copyright (c) 2001-2003, Brent R. Matzelle                                |</span></li>
<li><a name="a16"></a><span class="src-comm">| ------------------------------------------------------------------------- |</span></li>
<li><a name="a17"></a><span class="src-comm">|   License: Distributed under the Lesser General Public License (LGPL)     |</span></li>
<li><a name="a18"></a><span class="src-comm">|            http://www.gnu.org/copyleft/lesser.html                        |</span></li>
<li><a name="a19"></a><span class="src-comm">| This program is distributed in the hope that it will be useful - WITHOUT  |</span></li>
<li><a name="a20"></a><span class="src-comm">| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |</span></li>
<li><a name="a21"></a><span class="src-comm">| FITNESS FOR A PARTICULAR PURPOSE.                                         |</span></li>
<li><a name="a22"></a><span class="src-comm">| ------------------------------------------------------------------------- |</span></li>
<li><a name="a23"></a><span class="src-comm">| We offer a number of paid services (www.codeworxtech.com):                |</span></li>
<li><a name="a24"></a><span class="src-comm">| - Web Hosting on highly optimized fast and secure servers                 |</span></li>
<li><a name="a25"></a><span class="src-comm">| - Technology Consulting                                                   |</span></li>
<li><a name="a26"></a><span class="src-comm">| - Oursourcing (highly qualified programmers and graphic designers)        |</span></li>
<li><a name="a27"></a><span class="src-comm">'---------------------------------------------------------------------------'</span></li>
<li><a name="a28"></a><span class="src-comm">*/</span></li>
<li><a name="a29"></a>&nbsp;</li>
<li><a name="a30"></a><span class="src-doc">/**</span></li>
<li><a name="a31"></a><span class="src-doc"> * PHPMailer - PHP email transport class</span></li>
<li><a name="a32"></a><span class="src-doc"> * NOTE: Requires PHP version 5 or later</span></li>
<li><a name="a33"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> PHPMailer</span></li>
<li><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Andy Prevost</span></li>
<li><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Marcus Bointon</span></li>
<li><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> 2004 - 2009 Andy Prevost</span></li>
<li><a name="a37"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: class.phpmailer.php 254 2009-04-02 18:52:18Z codeworxtech $</span></li>
<li><a name="a38"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License</span></li>
<li><a name="a39"></a><span class="src-doc"> */</span></li>
<li><a name="a40"></a>&nbsp;</li>
<li><a name="a41"></a><span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/version_compare">version_compare</a><span class="src-sym">(</span><span class="src-id">PHP_VERSION</span><span class="src-sym">, </span><span class="src-str">'5.0.0'</span><span class="src-sym">, </span><span class="src-str">'&lt;'</span><span class="src-sym">) ) </span><span class="src-key">exit</span><span class="src-sym">(</span><span class="src-str">&quot;Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a42"></a>&nbsp;</li>
<li><a name="a43"></a><span class="src-key">class </span><a href="../PHPMailer/PHPMailer.html">PHPMailer</a> <span class="src-sym">{</span></li>
<li><a name="a44"></a>&nbsp;</li>
<li><a name="a45"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a46"></a>  <span class="src-comm">// PROPERTIES, PUBLIC</span></li>
<li><a name="a47"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a48"></a>&nbsp;</li>
<li><a name="a47"></a>  </li>
<li><a name="a48"></a>&nbsp;</li>
<li><a name="a49"></a>  <span class="src-doc">/**</span></li>
<li><a name="a50"></a><span class="src-doc">   * Email priority (1 = High, 3 = Normal, 5 = low).</span></li>
<li><a name="a51"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></li>
<li><a name="a52"></a><span class="src-doc">   */</span></li>
<li><a name="a53"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Priority">$Priority</a>          = <span class="src-num">3</span><span class="src-sym">;</span></li>
<li><a name="a54"></a>&nbsp;</li>
<li><a name="a55"></a>  <span class="src-doc">/**</span></li>
<li><a name="a56"></a><span class="src-doc">   * Sets the CharSet of the message.</span></li>
<li><a name="a57"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a58"></a><span class="src-doc">   */</span></li>
<li><a name="a59"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$CharSet">$CharSet</a>           = <span class="src-str">'iso-8859-1'</span><span class="src-sym">;</span></li>
<li><a name="a60"></a>&nbsp;</li>
<li><a name="a61"></a>  <span class="src-doc">/**</span></li>
<li><a name="a62"></a><span class="src-doc">   * Sets the Content-type of the message.</span></li>
<li><a name="a63"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a64"></a><span class="src-doc">   */</span></li>
<li><a name="a65"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$ContentType">$ContentType</a>       = <span class="src-str">'text/plain'</span><span class="src-sym">;</span></li>
<li><a name="a66"></a>&nbsp;</li>
<li><a name="a67"></a>  <span class="src-doc">/**</span></li>
<li><a name="a68"></a><span class="src-doc">   * Sets the Encoding of the message. Options for this are</span></li>
<li><a name="a69"></a><span class="src-doc">   *  &quot;8bit&quot;, &quot;7bit&quot;, &quot;binary&quot;, &quot;base64&quot;, and &quot;quoted-printable&quot;.</span></li>
<li><a name="a70"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a71"></a><span class="src-doc">   */</span></li>
<li><a name="a72"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Encoding">$Encoding</a>          = <span class="src-str">'8bit'</span><span class="src-sym">;</span></li>
<li><a name="a73"></a>&nbsp;</li>
<li><a name="a74"></a>  <span class="src-doc">/**</span></li>
<li><a name="a75"></a><span class="src-doc">   * Holds the most recent mailer error message.</span></li>
<li><a name="a76"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a77"></a><span class="src-doc">   */</span></li>
<li><a name="a78"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$ErrorInfo">$ErrorInfo</a>         = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a79"></a>&nbsp;</li>
<li><a name="a80"></a>  <span class="src-doc">/**</span></li>
<li><a name="a81"></a><span class="src-doc">   * Sets the From email address for the message.</span></li>
<li><a name="a82"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a83"></a><span class="src-doc">   */</span></li>
<li><a name="a84"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$From">$From</a>              = <span class="src-str">'root@localhost'</span><span class="src-sym">;</span></li>
<li><a name="a85"></a>&nbsp;</li>
<li><a name="a86"></a>  <span class="src-doc">/**</span></li>
<li><a name="a87"></a><span class="src-doc">   * Sets the From name of the message.</span></li>
<li><a name="a88"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a89"></a><span class="src-doc">   */</span></li>
<li><a name="a90"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$FromName">$FromName</a>          = <span class="src-str">'Root User'</span><span class="src-sym">;</span></li>
<li><a name="a91"></a>&nbsp;</li>
<li><a name="a92"></a>  <span class="src-doc">/**</span></li>
<li><a name="a93"></a><span class="src-doc">   * Sets the Sender email (Return-Path) of the message.  If not empty,</span></li>
<li><a name="a94"></a><span class="src-doc">   * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.</span></li>
<li><a name="a95"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a96"></a><span class="src-doc">   */</span></li>
<li><a name="a97"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Sender">$Sender</a>            = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a98"></a>&nbsp;</li>
<li><a name="a99"></a>  <span class="src-doc">/**</span></li>
<li><a name="a100"></a><span class="src-doc">   * Sets the Subject of the message.</span></li>
<li><a name="a101"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a102"></a><span class="src-doc">   */</span></li>
<li><a name="a103"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Subject">$Subject</a>           = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a104"></a>&nbsp;</li>
<li><a name="a105"></a>  <span class="src-doc">/**</span></li>
<li><a name="a106"></a><span class="src-doc">   * Sets the Body of the message.  This can be either an HTML or text body.</span></li>
<li><a name="a107"></a><span class="src-doc">   * If HTML then run IsHTML(true).</span></li>
<li><a name="a108"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a109"></a><span class="src-doc">   */</span></li>
<li><a name="a110"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Body">$Body</a>              = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a111"></a>&nbsp;</li>
<li><a name="a112"></a>  <span class="src-doc">/**</span></li>
<li><a name="a113"></a><span class="src-doc">   * Sets the text-only body of the message.  This automatically sets the</span></li>
<li><a name="a114"></a><span class="src-doc">   * email to multipart/alternative.  This body can be read by mail</span></li>
<li><a name="a115"></a><span class="src-doc">   * clients that do not have HTML email capability such as mutt. Clients</span></li>
<li><a name="a116"></a><span class="src-doc">   * that can read HTML will view the normal Body.</span></li>
<li><a name="a117"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a118"></a><span class="src-doc">   */</span></li>
<li><a name="a119"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$AltBody">$AltBody</a>           = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a120"></a>&nbsp;</li>
<li><a name="a121"></a>  <span class="src-doc">/**</span></li>
<li><a name="a122"></a><span class="src-doc">   * Sets word wrapping on the body of the message to a given number of</span></li>
<li><a name="a123"></a><span class="src-doc">   * characters.</span></li>
<li><a name="a124"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></li>
<li><a name="a125"></a><span class="src-doc">   */</span></li>
<li><a name="a126"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$WordWrap">$WordWrap</a>          = <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a127"></a>&nbsp;</li>
<li><a name="a128"></a>  <span class="src-doc">/**</span></li>
<li><a name="a129"></a><span class="src-doc">   * Method to send mail: (&quot;mail&quot;, &quot;sendmail&quot;, or &quot;smtp&quot;).</span></li>
<li><a name="a130"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a131"></a><span class="src-doc">   */</span></li>
<li><a name="a132"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Mailer">$Mailer</a>            = <span class="src-str">'mail'</span><span class="src-sym">;</span></li>
<li><a name="a133"></a>&nbsp;</li>
<li><a name="a134"></a>  <span class="src-doc">/**</span></li>
<li><a name="a135"></a><span class="src-doc">   * Sets the path of the sendmail program.</span></li>
<li><a name="a136"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a137"></a><span class="src-doc">   */</span></li>
<li><a name="a138"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Sendmail">$Sendmail</a>          = <span class="src-str">'/usr/sbin/sendmail'</span><span class="src-sym">;</span></li>
<li><a name="a139"></a>&nbsp;</li>
<li><a name="a140"></a>  <span class="src-doc">/**</span></li>
<li><a name="a141"></a><span class="src-doc">   * Path to PHPMailer plugins.  Useful if the SMTP class</span></li>
<li><a name="a142"></a><span class="src-doc">   * is in a different directory than the PHP include path.</span></li>
<li><a name="a143"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a144"></a><span class="src-doc">   */</span></li>
<li><a name="a145"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$PluginDir">$PluginDir</a>         = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a146"></a>&nbsp;</li>
<li><a name="a147"></a>  <span class="src-doc">/**</span></li>
<li><a name="a148"></a><span class="src-doc">   * Sets the email address that a reading confirmation will be sent.</span></li>
<li><a name="a149"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a150"></a><span class="src-doc">   */</span></li>
<li><a name="a151"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$ConfirmReadingTo">$ConfirmReadingTo</a>  = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a152"></a>&nbsp;</li>
<li><a name="a153"></a>  <span class="src-doc">/**</span></li>
<li><a name="a154"></a><span class="src-doc">   * Sets the hostname to use in Message-Id and Received headers</span></li>
<li><a name="a155"></a><span class="src-doc">   * and as default HELO string. If empty, the value returned</span></li>
<li><a name="a156"></a><span class="src-doc">   * by SERVER_NAME is used or 'localhost.localdomain'.</span></li>
<li><a name="a157"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a158"></a><span class="src-doc">   */</span></li>
<li><a name="a159"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Hostname">$Hostname</a>          = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a160"></a>&nbsp;</li>
<li><a name="a161"></a>  <span class="src-doc">/**</span></li>
<li><a name="a162"></a><span class="src-doc">   * Sets the message ID to be used in the Message-Id header.</span></li>
<li><a name="a163"></a><span class="src-doc">   * If empty, a unique id will be generated.</span></li>
<li><a name="a164"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a165"></a><span class="src-doc">   */</span></li>
<li><a name="a166"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$MessageID">$MessageID</a>         = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a167"></a>&nbsp;</li>
<li><a name="a168"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a169"></a>  <span class="src-comm">// PROPERTIES FOR SMTP</span></li>
<li><a name="a170"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a171"></a>&nbsp;</li>
<li><a name="a170"></a>  </li>
<li><a name="a171"></a>&nbsp;</li>
<li><a name="a172"></a>  <span class="src-doc">/**</span></li>
<li><a name="a173"></a><span class="src-doc">   * Sets the SMTP hosts.  All hosts must be separated by a</span></li>
<li><a name="a174"></a><span class="src-doc">   * semicolon.  You can also specify a different port</span></li>
<li><a name="a175"></a><span class="src-doc">   * for each host by using this format: [hostname:port]</span></li>
<li><a name="a176"></a><span class="src-doc">   * (e.g. &quot;smtp1.example.com:25;smtp2.example.com&quot;).</span></li>
<li><a name="a177"></a><span class="src-doc">   * Hosts will be tried in order.</span></li>
<li><a name="a178"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a179"></a><span class="src-doc">   */</span></li>
<li><a name="a180"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Host">$Host</a>          = <span class="src-str">'localhost'</span><span class="src-sym">;</span></li>
<li><a name="a181"></a>&nbsp;</li>
<li><a name="a182"></a>  <span class="src-doc">/**</span></li>
<li><a name="a183"></a><span class="src-doc">   * Sets the default SMTP server port.</span></li>
<li><a name="a184"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></li>
<li><a name="a185"></a><span class="src-doc">   */</span></li>
<li><a name="a186"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Port">$Port</a>          = <span class="src-num">25</span><span class="src-sym">;</span></li>
<li><a name="a187"></a>&nbsp;</li>
<li><a name="a188"></a>  <span class="src-doc">/**</span></li>
<li><a name="a189"></a><span class="src-doc">   * Sets the SMTP HELO of the message (Default is $Hostname).</span></li>
<li><a name="a190"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a191"></a><span class="src-doc">   */</span></li>
<li><a name="a192"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Helo">$Helo</a>          = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a193"></a>&nbsp;</li>
<li><a name="a194"></a>  <span class="src-doc">/**</span></li>
<li><a name="a195"></a><span class="src-doc">   * Sets connection prefix.</span></li>
<li><a name="a196"></a><span class="src-doc">   * Options are &quot;&quot;, &quot;ssl&quot; or &quot;tls&quot;</span></li>
<li><a name="a197"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a198"></a><span class="src-doc">   */</span></li>
<li><a name="a199"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$SMTPSecure">$SMTPSecure</a>    = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a200"></a>&nbsp;</li>
<li><a name="a201"></a>  <span class="src-doc">/**</span></li>
<li><a name="a202"></a><span class="src-doc">   * Sets SMTP authentication. Utilizes the Username and Password variables.</span></li>
<li><a name="a203"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">bool </span></li>
<li><a name="a204"></a><span class="src-doc">   */</span></li>
<li><a name="a205"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$SMTPAuth">$SMTPAuth</a>      = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a206"></a>&nbsp;</li>
<li><a name="a207"></a>  <span class="src-doc">/**</span></li>
<li><a name="a208"></a><span class="src-doc">   * Sets SMTP username.</span></li>
<li><a name="a209"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a210"></a><span class="src-doc">   */</span></li>
<li><a name="a211"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Username">$Username</a>      = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a212"></a>&nbsp;</li>
<li><a name="a213"></a>  <span class="src-doc">/**</span></li>
<li><a name="a214"></a><span class="src-doc">   * Sets SMTP password.</span></li>
<li><a name="a215"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a216"></a><span class="src-doc">   */</span></li>
<li><a name="a217"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Password">$Password</a>      = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a218"></a>&nbsp;</li>
<li><a name="a219"></a>  <span class="src-doc">/**</span></li>
<li><a name="a220"></a><span class="src-doc">   * Sets the SMTP server timeout in seconds.</span></li>
<li><a name="a221"></a><span class="src-doc">   * This function will not work with the win32 version.</span></li>
<li><a name="a222"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">int </span></li>
<li><a name="a223"></a><span class="src-doc">   */</span></li>
<li><a name="a224"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$Timeout">$Timeout</a>       = <span class="src-num">10</span><span class="src-sym">;</span></li>
<li><a name="a225"></a>&nbsp;</li>
<li><a name="a226"></a>  <span class="src-doc">/**</span></li>
<li><a name="a227"></a><span class="src-doc">   * Sets SMTP class debugging on or off.</span></li>
<li><a name="a228"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">bool </span></li>
<li><a name="a229"></a><span class="src-doc">   */</span></li>
<li><a name="a230"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$SMTPDebug">$SMTPDebug</a>     = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a231"></a>&nbsp;</li>
<li><a name="a232"></a>  <span class="src-doc">/**</span></li>
<li><a name="a233"></a><span class="src-doc">   * Prevents the SMTP connection from being closed after each mail</span></li>
<li><a name="a234"></a><span class="src-doc">   * sending.  If this is set to true then to close the connection</span></li>
<li><a name="a235"></a><span class="src-doc">   * requires an explicit call to SmtpClose().</span></li>
<li><a name="a236"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">bool </span></li>
<li><a name="a237"></a><span class="src-doc">   */</span></li>
<li><a name="a238"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$SMTPKeepAlive">$SMTPKeepAlive</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a239"></a>&nbsp;</li>
<li><a name="a240"></a>  <span class="src-doc">/**</span></li>
<li><a name="a241"></a><span class="src-doc">   * Provides the ability to have the TO field process individual</span></li>
<li><a name="a242"></a><span class="src-doc">   * emails, instead of sending to entire TO addresses</span></li>
<li><a name="a243"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">bool </span></li>
<li><a name="a244"></a><span class="src-doc">   */</span></li>
<li><a name="a245"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$SingleTo">$SingleTo</a>      = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a246"></a>&nbsp;</li>
<li><a name="a247"></a>  <span class="src-doc">/**</span></li>
<li><a name="a248"></a><span class="src-doc">   * Provides the ability to change the line ending</span></li>
<li><a name="a249"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a250"></a><span class="src-doc">   */</span></li>
<li><a name="a251"></a>  <span class="src-key">public </span><a href="../PHPMailer/PHPMailer.html#var$LE">$LE</a>              = <span class="src-str">&quot;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a252"></a>&nbsp;</li>
<li><a name="a253"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a254"></a>  <span class="src-comm">// PROPERTIES, PRIVATE AND PROTECTED</span></li>
<li><a name="a255"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a256"></a>&nbsp;</li>
<li><a name="a255"></a>  </li>
<li><a name="a256"></a>&nbsp;</li>
<li><a name="a257"></a>  <span class="src-key">private   </span><span class="src-var">$smtp           </span>= <span class="src-id">NULL</span><span class="src-sym">;</span></li>
<li><a name="a258"></a>  <span class="src-key">private   </span><span class="src-var">$to             </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a259"></a>  <span class="src-key">private   </span><span class="src-var">$cc             </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a260"></a>  <span class="src-key">private   </span><span class="src-var">$bcc            </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a261"></a>  <span class="src-key">private   </span><span class="src-var">$ReplyTo        </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a262"></a>  <span class="src-key">private   </span><span class="src-var">$all_recipients </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a263"></a>  <span class="src-key">private   </span><span class="src-var">$attachment     </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a264"></a>  <span class="src-key">private   </span><span class="src-var">$CustomHeader   </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a265"></a>  <span class="src-key">private   </span><span class="src-var">$message_type   </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a266"></a>  <span class="src-key">private   </span><span class="src-var">$boundary       </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a267"></a>  <span class="src-key">protected </span><a href="../PHPMailer/PHPMailer.html#var$language">$language</a>       = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a268"></a>  <span class="src-key">private   </span><span class="src-var">$error_count    </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a269"></a>  <span class="src-key">private   </span><span class="src-var">$sign_cert_file </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a270"></a>  <span class="src-key">private   </span><span class="src-var">$sign_key_file  </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a271"></a>  <span class="src-key">private   </span><span class="src-var">$sign_key_pass  </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a272"></a>  <span class="src-key">private   </span><span class="src-var">$exceptions     </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a273"></a>&nbsp;</li>
<li><a name="a274"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a275"></a>  <span class="src-comm">// CONSTANTS</span></li>
<li><a name="a276"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a277"></a>&nbsp;</li>
<li><a name="a276"></a>  </li>
<li><a name="a277"></a>&nbsp;</li>
<li><a name="a278"></a>  <span class="src-key">const </span><span class="src-id">VERSION </span>= <span class="src-str">'5.0.0'</span><span class="src-sym">;</span></li>
<li><a name="a279"></a>  <span class="src-key">const </span><span class="src-id">STOP_MESSAGE </span>= <span class="src-num">0</span><span class="src-sym">; </span><span class="src-comm">// message only, continue processing</span></li>
<li><a name="a279"></a>  </li>
<li><a name="a280"></a>  <span class="src-key">const </span><span class="src-id">STOP_CONTINUE </span>= <span class="src-num">1</span><span class="src-sym">; </span><span class="src-comm">// message?, likely ok to continue processing</span></li>
<li><a name="a280"></a>  </li>
<li><a name="a281"></a>  <span class="src-key">const </span><span class="src-id">STOP_CRITICAL </span>= <span class="src-num">2</span><span class="src-sym">; </span><span class="src-comm">// message, plus full stop, critical error reached</span></li>
<li><a name="a282"></a>&nbsp;</li>
<li><a name="a283"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a284"></a>  <span class="src-comm">// METHODS, VARIABLES</span></li>
<li><a name="a285"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a286"></a>&nbsp;</li>
<li><a name="a285"></a>  </li>
<li><a name="a286"></a>&nbsp;</li>
<li><a name="a287"></a>  <span class="src-doc">/**</span></li>
<li><a name="a288"></a><span class="src-doc">   * Constructor</span></li>
<li><a name="a289"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$exceptions </span><span class="src-doc">Should we throw external exceptions?</span></li>
<li><a name="a290"></a><span class="src-doc">   */</span></li>
<li><a name="a291"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-var">$exceptions </span>= <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a292"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">exceptions </span>= <span class="src-sym">(</span><span class="src-var">$exceptions </span>== <span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a293"></a>  <span class="src-sym">}</span></li>
<li><a name="a294"></a>&nbsp;</li>
<li><a name="a295"></a>  <span class="src-doc">/**</span></li>
<li><a name="a296"></a><span class="src-doc">   * Sets message type to HTML.</span></li>
<li><a name="a297"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">bool </span><span class="src-doc-var">$ishtml </span></li>
<li><a name="a298"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a299"></a><span class="src-doc">   */</span></li>
<li><a name="a300"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodIsHTML">IsHTML</a><span class="src-sym">(</span><span class="src-var">$ishtml </span>= <span class="src-id">true</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a301"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$ishtml</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a302"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$ContentType">ContentType</a> = <span class="src-str">'text/html'</span><span class="src-sym">;</span></li>
<li><a name="a303"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a304"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$ContentType">ContentType</a> = <span class="src-str">'text/plain'</span><span class="src-sym">;</span></li>
<li><a name="a305"></a>    <span class="src-sym">}</span></li>
<li><a name="a306"></a>  <span class="src-sym">}</span></li>
<li><a name="a307"></a>&nbsp;</li>
<li><a name="a308"></a>  <span class="src-doc">/**</span></li>
<li><a name="a309"></a><span class="src-doc">   * Sets Mailer to send message using SMTP.</span></li>
<li><a name="a310"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a311"></a><span class="src-doc">   */</span></li>
<li><a name="a312"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodIsSMTP">IsSMTP</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a313"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> = <span class="src-str">'smtp'</span><span class="src-sym">;</span></li>
<li><a name="a314"></a>  <span class="src-sym">}</span></li>
<li><a name="a315"></a>&nbsp;</li>
<li><a name="a316"></a>  <span class="src-doc">/**</span></li>
<li><a name="a317"></a><span class="src-doc">   * Sets Mailer to send message using PHP mail() function.</span></li>
<li><a name="a318"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a319"></a><span class="src-doc">   */</span></li>
<li><a name="a320"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodIsMail">IsMail</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a321"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> = <span class="src-str">'mail'</span><span class="src-sym">;</span></li>
<li><a name="a322"></a>  <span class="src-sym">}</span></li>
<li><a name="a323"></a>&nbsp;</li>
<li><a name="a324"></a>  <span class="src-doc">/**</span></li>
<li><a name="a325"></a><span class="src-doc">   * Sets Mailer to send message using the $Sendmail program.</span></li>
<li><a name="a326"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a327"></a><span class="src-doc">   */</span></li>
<li><a name="a328"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodIsSendmail">IsSendmail</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a329"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/stristr">stristr</a><span class="src-sym">(</span><a href="http://www.php.net/ini_get">ini_get</a><span class="src-sym">(</span><span class="src-str">'sendmail_path'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-str">'sendmail'</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a330"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sendmail">Sendmail</a> = <span class="src-str">'/var/qmail/bin/sendmail'</span><span class="src-sym">;</span></li>
<li><a name="a331"></a>    <span class="src-sym">}</span></li>
<li><a name="a332"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> = <span class="src-str">'sendmail'</span><span class="src-sym">;</span></li>
<li><a name="a333"></a>  <span class="src-sym">}</span></li>
<li><a name="a334"></a>&nbsp;</li>
<li><a name="a335"></a>  <span class="src-doc">/**</span></li>
<li><a name="a336"></a><span class="src-doc">   * Sets Mailer to send message using the qmail MTA.</span></li>
<li><a name="a337"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a338"></a><span class="src-doc">   */</span></li>
<li><a name="a339"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodIsQmail">IsQmail</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a340"></a>    <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/stristr">stristr</a><span class="src-sym">(</span><a href="http://www.php.net/ini_get">ini_get</a><span class="src-sym">(</span><span class="src-str">'sendmail_path'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-str">'qmail'</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a341"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sendmail">Sendmail</a> = <span class="src-str">'/var/qmail/bin/sendmail'</span><span class="src-sym">;</span></li>
<li><a name="a342"></a>    <span class="src-sym">}</span></li>
<li><a name="a343"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> = <span class="src-str">'sendmail'</span><span class="src-sym">;</span></li>
<li><a name="a344"></a>  <span class="src-sym">}</span></li>
<li><a name="a345"></a>&nbsp;</li>
<li><a name="a346"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a347"></a>  <span class="src-comm">// METHODS, RECIPIENTS</span></li>
<li><a name="a348"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a349"></a>&nbsp;</li>
<li><a name="a348"></a>  </li>
<li><a name="a349"></a>&nbsp;</li>
<li><a name="a350"></a>  <span class="src-doc">/**</span></li>
<li><a name="a351"></a><span class="src-doc">   * Adds a &quot;To&quot; address.</span></li>
<li><a name="a352"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$address </span></li>
<li><a name="a353"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$name </span></li>
<li><a name="a354"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span><span class="src-doc">true on success, false if address already used</span></li>
<li><a name="a355"></a><span class="src-doc">   */</span></li>
<li><a name="a356"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddAddress">AddAddress</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a357"></a>    <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">AddAnAddress</span><span class="src-sym">(</span><span class="src-str">'to'</span><span class="src-sym">, </span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a358"></a>  <span class="src-sym">}</span></li>
<li><a name="a359"></a>&nbsp;</li>
<li><a name="a360"></a>  <span class="src-doc">/**</span></li>
<li><a name="a361"></a><span class="src-doc">   * Adds a &quot;Cc&quot; address.</span></li>
<li><a name="a362"></a><span class="src-doc">   * Note: this function works with the SMTP mailer on win32, not with the &quot;mail&quot; mailer.</span></li>
<li><a name="a363"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$address </span></li>
<li><a name="a364"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$name </span></li>
<li><a name="a365"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span><span class="src-doc">true on success, false if address already used</span></li>
<li><a name="a366"></a><span class="src-doc">   */</span></li>
<li><a name="a367"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddCC">AddCC</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a368"></a>    <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">AddAnAddress</span><span class="src-sym">(</span><span class="src-str">'cc'</span><span class="src-sym">, </span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a369"></a>  <span class="src-sym">}</span></li>
<li><a name="a370"></a>&nbsp;</li>
<li><a name="a371"></a>  <span class="src-doc">/**</span></li>
<li><a name="a372"></a><span class="src-doc">   * Adds a &quot;Bcc&quot; address.</span></li>
<li><a name="a373"></a><span class="src-doc">   * Note: this function works with the SMTP mailer on win32, not with the &quot;mail&quot; mailer.</span></li>
<li><a name="a374"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$address </span></li>
<li><a name="a375"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$name </span></li>
<li><a name="a376"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span><span class="src-doc">true on success, false if address already used</span></li>
<li><a name="a377"></a><span class="src-doc">   */</span></li>
<li><a name="a378"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddBCC">AddBCC</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a379"></a>    <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">AddAnAddress</span><span class="src-sym">(</span><span class="src-str">'bcc'</span><span class="src-sym">, </span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a380"></a>  <span class="src-sym">}</span></li>
<li><a name="a381"></a>&nbsp;</li>
<li><a name="a382"></a>  <span class="src-doc">/**</span></li>
<li><a name="a383"></a><span class="src-doc">   * Adds a &quot;Reply-to&quot; address.</span></li>
<li><a name="a384"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$address </span></li>
<li><a name="a385"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$name </span></li>
<li><a name="a386"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span></li>
<li><a name="a387"></a><span class="src-doc">   */</span></li>
<li><a name="a388"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddReplyTo">AddReplyTo</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a389"></a>    <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">AddAnAddress</span><span class="src-sym">(</span><span class="src-str">'ReplyTo'</span><span class="src-sym">, </span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a390"></a>  <span class="src-sym">}</span></li>
<li><a name="a391"></a>&nbsp;</li>
<li><a name="a392"></a>  <span class="src-doc">/**</span></li>
<li><a name="a393"></a><span class="src-doc">   * Adds an address to one of the recipient arrays</span></li>
<li><a name="a394"></a><span class="src-doc">   * Addresses that have been added already return false, but do not throw exceptions</span></li>
<li><a name="a395"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$kind </span><span class="src-doc">One of 'to', 'cc', 'bcc', 'ReplyTo'</span></li>
<li><a name="a396"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$address </span><span class="src-doc">The email address to send to</span></li>
<li><a name="a397"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$name </span></li>
<li><a name="a398"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span><span class="src-doc">true on success, false if address already used or invalid in some way</span></li>
<li><a name="a399"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a400"></a><span class="src-doc">   */</span></li>
<li><a name="a401"></a>  <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">AddAnAddress</span><span class="src-sym">(</span><span class="src-var">$kind</span><span class="src-sym">, </span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a402"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'/^(to|cc|bcc|ReplyTo)$/'</span><span class="src-sym">, </span><span class="src-var">$kind</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a403"></a>      echo <span class="src-str">'Invalid recipient array: ' </span>. <span class="src-id">kind</span><span class="src-sym">;</span></li>
<li><a name="a404"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a405"></a>    <span class="src-sym">}</span></li>
<li><a name="a406"></a>    <span class="src-var">$address </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a407"></a>    <span class="src-var">$name </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/[\r\n]+/'</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">; </span><span class="src-comm">//Strip breaks and trim</span></li>
<li><a name="a408"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">ValidateAddress</span><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a409"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetError">SetError</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'invalid_address'</span><span class="src-sym">)</span>.<span class="src-str">': '</span>. <span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a410"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">exceptions</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a411"></a>        throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'invalid_address'</span><span class="src-sym">)</span>.<span class="src-str">': '</span>.<span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a412"></a>      <span class="src-sym">}</span></li>
<li><a name="a413"></a>      echo <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'invalid_address'</span><span class="src-sym">)</span>.<span class="src-str">': '</span>.<span class="src-var">$address</span><span class="src-sym">;</span></li>
<li><a name="a414"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a415"></a>    <span class="src-sym">}</span></li>
<li><a name="a416"></a>  <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$kind </span>!= <span class="src-str">'ReplyTo'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a417"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">all_recipients</span><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a418"></a>        <a href="http://www.php.net/array_push">array_push</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">$kind</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a419"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">all_recipients</span><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">] </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a420"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a421"></a>      <span class="src-sym">}</span></li>
<li><a name="a422"></a>  <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a423"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">ReplyTo</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a424"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">ReplyTo</span><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a425"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a426"></a>    <span class="src-sym">}</span></li>
<li><a name="a427"></a>  <span class="src-sym">}</span></li>
<li><a name="a428"></a>    <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a429"></a>  <span class="src-sym">}</span></li>
<li><a name="a430"></a>&nbsp;</li>
<li><a name="a431"></a><span class="src-doc">/**</span></li>
<li><a name="a432"></a><span class="src-doc"> * Set the From and FromName properties</span></li>
<li><a name="a433"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$address </span></li>
<li><a name="a434"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$name </span></li>
<li><a name="a435"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span></li>
<li><a name="a436"></a><span class="src-doc"> */</span></li>
<li><a name="a437"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSetFrom">SetFrom</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-var">$name </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a438"></a>    <span class="src-var">$address </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a439"></a>    <span class="src-var">$name </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/[\r\n]+/'</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">; </span><span class="src-comm">//Strip breaks and trim</span></li>
<li><a name="a440"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">ValidateAddress</span><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a441"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetError">SetError</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'invalid_address'</span><span class="src-sym">)</span>.<span class="src-str">': '</span>. <span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a442"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">exceptions</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a443"></a>        throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'invalid_address'</span><span class="src-sym">)</span>.<span class="src-str">': '</span>.<span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a444"></a>      <span class="src-sym">}</span></li>
<li><a name="a445"></a>      echo <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'invalid_address'</span><span class="src-sym">)</span>.<span class="src-str">': '</span>.<span class="src-var">$address</span><span class="src-sym">;</span></li>
<li><a name="a446"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a447"></a>    <span class="src-sym">}</span></li>
<li><a name="a448"></a>  <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$From">From</a> = <span class="src-var">$address</span><span class="src-sym">;</span></li>
<li><a name="a449"></a>  <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$FromName">FromName</a> = <span class="src-var">$name</span><span class="src-sym">;</span></li>
<li><a name="a450"></a>  <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a451"></a>  <span class="src-sym">}</span></li>
<li><a name="a452"></a>&nbsp;</li>
<li><a name="a453"></a>  <span class="src-doc">/**</span></li>
<li><a name="a454"></a><span class="src-doc">   * Check that a string looks roughly like an email address should</span></li>
<li><a name="a455"></a><span class="src-doc">   * Static so it can be used without instantiation</span></li>
<li><a name="a456"></a><span class="src-doc">   * Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator</span></li>
<li><a name="a457"></a><span class="src-doc">   * Conforms approximately to RFC2822</span></li>
<li><a name="a458"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@link</span><span class="src-doc"> http://www.hexillion.com/samples/#Regex Original pattern found here</span></li>
<li><a name="a459"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$address </span><span class="src-doc">The email address to check</span></li>
<li><a name="a460"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span></li>
<li><a name="a461"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@static</span></li>
<li><a name="a462"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a463"></a><span class="src-doc">   */</span></li>
<li><a name="a464"></a>  <span class="src-key">public </span><span class="src-key">static </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodValidateAddress">ValidateAddress</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a465"></a>    <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">'filter_var'</span><span class="src-sym">)) </span><span class="src-sym">{ </span><span class="src-comm">//Introduced in PHP 5.2</span></li>
<li><a name="a466"></a>      <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/filter_var">filter_var</a><span class="src-sym">(</span><span class="src-var">$address</span><span class="src-sym">, </span><span class="src-id">FILTER_VALIDATE_EMAIL</span><span class="src-sym">) </span>=== <span class="src-id">FALSE</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a467"></a>        <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a468"></a>      <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a469"></a>        <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a470"></a>      <span class="src-sym">}</span></li>
<li><a name="a471"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a472"></a>      <span class="src-key">return </span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'/^(?:[\w\!\#\$\%\&amp;\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&amp;\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/'</span><span class="src-sym">, </span><span class="src-var">$address</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a473"></a>    <span class="src-sym">}</span></li>
<li><a name="a474"></a>  <span class="src-sym">}</span></li>
<li><a name="a475"></a>&nbsp;</li>
<li><a name="a476"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a477"></a>  <span class="src-comm">// METHODS, MAIL SENDING</span></li>
<li><a name="a478"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a479"></a>&nbsp;</li>
<li><a name="a478"></a>  </li>
<li><a name="a479"></a>&nbsp;</li>
<li><a name="a480"></a>  <span class="src-doc">/**</span></li>
<li><a name="a481"></a><span class="src-doc">   * Creates message and assigns Mailer. If the message is</span></li>
<li><a name="a482"></a><span class="src-doc">   * not sent successfully then it returns false.  Use the ErrorInfo</span></li>
<li><a name="a483"></a><span class="src-doc">   * variable to view description of the error.</span></li>
<li><a name="a484"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a485"></a><span class="src-doc">   */</span></li>
<li><a name="a486"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSend">Send</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a487"></a>    try <span class="src-sym">{</span></li>
<li><a name="a488"></a>      <span class="src-key">if </span><span class="src-sym">((</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">to</span><span class="src-sym">) </span>+ <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">cc</span><span class="src-sym">) </span>+ <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">bcc</span><span class="src-sym">)) </span>&lt; <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a489"></a>        throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'provide_address'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a490"></a>      <span class="src-sym">}</span></li>
<li><a name="a491"></a>&nbsp;</li>
<li><a name="a492"></a>      <span class="src-comm">// Set whether the message is multipart/alternative</span></li>
<li><a name="a493"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a494"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$ContentType">ContentType</a> = <span class="src-str">'multipart/alternative'</span><span class="src-sym">;</span></li>
<li><a name="a495"></a>      <span class="src-sym">}</span></li>
<li><a name="a496"></a>&nbsp;</li>
<li><a name="a497"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error_count </span>= <span class="src-num">0</span><span class="src-sym">; </span><span class="src-comm">// reset errors</span></li>
<li><a name="a498"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">SetMessageType</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a499"></a>      <span class="src-var">$header </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodCreateHeader">CreateHeader</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a500"></a>      <span class="src-var">$body </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodCreateBody">CreateBody</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a501"></a>&nbsp;</li>
<li><a name="a502"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Body">Body</a><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a503"></a>        throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'empty_message'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a504"></a>      <span class="src-sym">}</span></li>
<li><a name="a505"></a>&nbsp;</li>
<li><a name="a506"></a>      <span class="src-comm">// Choose the mailer and send through it</span></li>
<li><a name="a507"></a>      <span class="src-key">switch</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a508"></a>        <span class="src-key">case </span><span class="src-str">'sendmail'</span>:</li>
<li><a name="a509"></a>          <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSendmailSend">SendmailSend</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a510"></a>        <span class="src-key">case </span><span class="src-str">'smtp'</span>:</li>
<li><a name="a511"></a>          <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSmtpSend">SmtpSend</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a512"></a>        <span class="src-key">case </span><span class="src-str">'mail'</span>:</li>
<li><a name="a513"></a>        <span class="src-key">default</span>:</li>
<li><a name="a514"></a>          <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodMailSend">MailSend</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a515"></a>      <span class="src-sym">}</span></li>
<li><a name="a516"></a>&nbsp;</li>
<li><a name="a517"></a>    <span class="src-sym">} </span>catch <span class="src-sym">(</span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a> </span><span class="src-var">$e</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a518"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetError">SetError</a><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-&gt;</span><span class="src-id">getMessage</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a519"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">exceptions</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a520"></a>        throw <span class="src-var">$e</span><span class="src-sym">;</span></li>
<li><a name="a521"></a>      <span class="src-sym">}</span></li>
<li><a name="a522"></a>      echo <span class="src-var">$e</span><span class="src-sym">-&gt;</span><span class="src-id">getMessage</span><span class="src-sym">(</span><span class="src-sym">)</span>.<span class="src-str">&quot;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a523"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a524"></a>    <span class="src-sym">}</span></li>
<li><a name="a525"></a>  <span class="src-sym">}</span></li>
<li><a name="a526"></a>&nbsp;</li>
<li><a name="a527"></a>  <span class="src-doc">/**</span></li>
<li><a name="a528"></a><span class="src-doc">   * Sends mail using the $Sendmail program.</span></li>
<li><a name="a529"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$header </span><span class="src-doc">The message headers</span></li>
<li><a name="a530"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$body </span><span class="src-doc">The message body</span></li>
<li><a name="a531"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> protected</span></li>
<li><a name="a532"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a533"></a><span class="src-doc">   */</span></li>
<li><a name="a534"></a>  <span class="src-key">protected </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSendmailSend">SendmailSend</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a535"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sender">Sender</a> != <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a536"></a>      <span class="src-var">$sendmail </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;%s -oi -f %s -t&quot;</span><span class="src-sym">, </span><a href="http://www.php.net/escapeshellcmd">escapeshellcmd</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sendmail">Sendmail</a><span class="src-sym">)</span><span class="src-sym">, </span><a href="http://www.php.net/escapeshellarg">escapeshellarg</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sender">Sender</a><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a537"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a538"></a>      <span class="src-var">$sendmail </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;%s -oi -t&quot;</span><span class="src-sym">, </span><a href="http://www.php.net/escapeshellcmd">escapeshellcmd</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sendmail">Sendmail</a><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a539"></a>    <span class="src-sym">}</span></li>
<li><a name="a540"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-sym">@</span><span class="src-var">$mail </span>= <a href="http://www.php.net/popen">popen</a><span class="src-sym">(</span><span class="src-var">$sendmail</span><span class="src-sym">, </span><span class="src-str">'w'</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a541"></a>      throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'execute'</span><span class="src-sym">) </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sendmail">Sendmail</a><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a542"></a>    <span class="src-sym">}</span></li>
<li><a name="a543"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$mail</span><span class="src-sym">, </span><span class="src-var">$header</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a544"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$mail</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a545"></a>    <span class="src-var">$result </span>= <a href="http://www.php.net/pclose">pclose</a><span class="src-sym">(</span><span class="src-var">$mail</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a546"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$result </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a547"></a>      throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'execute'</span><span class="src-sym">) </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sendmail">Sendmail</a><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a548"></a>    <span class="src-sym">}</span></li>
<li><a name="a549"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a550"></a>  <span class="src-sym">}</span></li>
<li><a name="a551"></a>&nbsp;</li>
<li><a name="a552"></a>  <span class="src-doc">/**</span></li>
<li><a name="a553"></a><span class="src-doc">   * Sends mail using the PHP mail() function.</span></li>
<li><a name="a554"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$header </span><span class="src-doc">The message headers</span></li>
<li><a name="a555"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$body </span><span class="src-doc">The message body</span></li>
<li><a name="a556"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> protected</span></li>
<li><a name="a557"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a558"></a><span class="src-doc">   */</span></li>
<li><a name="a559"></a>  <span class="src-key">protected </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodMailSend">MailSend</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a560"></a>    <span class="src-var">$toArr </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a561"></a>    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">to </span><span class="src-key">as </span><span class="src-var">$t</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a562"></a>      <span class="src-var">$toArr</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodAddrFormat">AddrFormat</a><span class="src-sym">(</span><span class="src-var">$t</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a563"></a>    <span class="src-sym">}</span></li>
<li><a name="a564"></a>    <span class="src-var">$to </span>= <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">', '</span><span class="src-sym">, </span><span class="src-var">$toArr</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a565"></a>&nbsp;</li>
<li><a name="a566"></a>    <span class="src-var">$params </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;-oi -f %s&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sender">Sender</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a567"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sender">Sender</a> != <span class="src-str">'' </span>&amp;&amp; <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><a href="http://www.php.net/ini_get">ini_get</a><span class="src-sym">(</span><span class="src-str">'safe_mode'</span><span class="src-sym">))</span>&lt; <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a568"></a>      <span class="src-var">$old_from </span>= <a href="http://www.php.net/ini_get">ini_get</a><span class="src-sym">(</span><span class="src-str">'sendmail_from'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a569"></a>      <a href="http://www.php.net/ini_set">ini_set</a><span class="src-sym">(</span><span class="src-str">'sendmail_from'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sender">Sender</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a570"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$SingleTo">SingleTo</a> === <span class="src-id">true </span>&amp;&amp; <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$toArr</span><span class="src-sym">) </span>&gt; <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a571"></a>        <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$toArr </span><span class="src-key">as </span><span class="src-var">$key </span>=&gt; <span class="src-var">$val</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a572"></a>          <span class="src-var">$rt </span>= <span class="src-sym">@</span><a href="http://www.php.net/mail">mail</a><span class="src-sym">(</span><span class="src-var">$val</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Subject">Subject</a><span class="src-sym">))</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">, </span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-var">$params</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a573"></a>        <span class="src-sym">}</span></li>
<li><a name="a574"></a>      <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a575"></a>        <span class="src-var">$rt </span>= <span class="src-sym">@</span><a href="http://www.php.net/mail">mail</a><span class="src-sym">(</span><span class="src-var">$to</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Subject">Subject</a><span class="src-sym">))</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">, </span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-var">$params</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a576"></a>      <span class="src-sym">}</span></li>
<li><a name="a577"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a578"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$SingleTo">SingleTo</a> === <span class="src-id">true </span>&amp;&amp; <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$toArr</span><span class="src-sym">) </span>&gt; <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a579"></a>        <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$toArr </span><span class="src-key">as </span><span class="src-var">$key </span>=&gt; <span class="src-var">$val</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a580"></a>          <span class="src-var">$rt </span>= <span class="src-sym">@</span><a href="http://www.php.net/mail">mail</a><span class="src-sym">(</span><span class="src-var">$val</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Subject">Subject</a><span class="src-sym">))</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">, </span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-var">$params</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a581"></a>        <span class="src-sym">}</span></li>
<li><a name="a582"></a>      <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a583"></a>        <span class="src-var">$rt </span>= <span class="src-sym">@</span><a href="http://www.php.net/mail">mail</a><span class="src-sym">(</span><span class="src-var">$to</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Subject">Subject</a><span class="src-sym">))</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">, </span><span class="src-var">$header</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a584"></a>      <span class="src-sym">}</span></li>
<li><a name="a585"></a>    <span class="src-sym">}</span></li>
<li><a name="a586"></a>    <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$old_from</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a587"></a>      <a href="http://www.php.net/ini_set">ini_set</a><span class="src-sym">(</span><span class="src-str">'sendmail_from'</span><span class="src-sym">, </span><span class="src-var">$old_from</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a588"></a>    <span class="src-sym">}</span></li>
<li><a name="a589"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$rt</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a590"></a>      throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'instantiate'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a591"></a>    <span class="src-sym">}</span></li>
<li><a name="a592"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a593"></a>  <span class="src-sym">}</span></li>
<li><a name="a594"></a>&nbsp;</li>
<li><a name="a595"></a>  <span class="src-doc">/**</span></li>
<li><a name="a596"></a><span class="src-doc">   * Sends mail via SMTP using PhpSMTP</span></li>
<li><a name="a597"></a><span class="src-doc">   * Returns false if there is a bad MAIL FROM, RCPT, or DATA input.</span></li>
<li><a name="a598"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$header </span><span class="src-doc">The message headers</span></li>
<li><a name="a599"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$body </span><span class="src-doc">The message body</span></li>
<li><a name="a600"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> SMTP</span></li>
<li><a name="a601"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> protected</span></li>
<li><a name="a602"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a603"></a><span class="src-doc">   */</span></li>
<li><a name="a604"></a>  <span class="src-key">protected </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSmtpSend">SmtpSend</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a605"></a>    <span class="src-inc">require_once </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$PluginDir">PluginDir</a> . <span class="src-str">'class.smtp.php'</span><span class="src-sym">;</span></li>
<li><a name="a606"></a>    <span class="src-var">$bad_rcpt </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a607"></a>&nbsp;</li>
<li><a name="a608"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSmtpConnect">SmtpConnect</a><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a609"></a>      throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'smtp_connect_failed'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a610"></a>    <span class="src-sym">}</span></li>
<li><a name="a611"></a>    <span class="src-var">$smtp_from </span>= <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sender">Sender</a> == <span class="src-str">''</span><span class="src-sym">) </span>? <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$From">From</a> : <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sender">Sender</a><span class="src-sym">;</span></li>
<li><a name="a612"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Mail</span><span class="src-sym">(</span><span class="src-var">$smtp_from</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a613"></a>      throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'from_failed'</span><span class="src-sym">) </span>. <span class="src-var">$smtp_from</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a614"></a>    <span class="src-sym">}</span></li>
<li><a name="a615"></a>&nbsp;</li>
<li><a name="a616"></a>    <span class="src-comm">// Attempt to send attach all recipients</span></li>
<li><a name="a617"></a>    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">to </span><span class="src-key">as </span><span class="src-var">$to</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a618"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Recipient</span><span class="src-sym">(</span><span class="src-var">$to</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a619"></a>        <span class="src-var">$bad_rcpt</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$to</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a620"></a>      <span class="src-sym">}</span></li>
<li><a name="a621"></a>    <span class="src-sym">}</span></li>
<li><a name="a622"></a>    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">cc </span><span class="src-key">as </span><span class="src-var">$cc</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a623"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Recipient</span><span class="src-sym">(</span><span class="src-var">$cc</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a624"></a>        <span class="src-var">$bad_rcpt</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$cc</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a625"></a>      <span class="src-sym">}</span></li>
<li><a name="a626"></a>    <span class="src-sym">}</span></li>
<li><a name="a627"></a>    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">bcc </span><span class="src-key">as </span><span class="src-var">$bcc</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a628"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Recipient</span><span class="src-sym">(</span><span class="src-var">$bcc</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a629"></a>        <span class="src-var">$bad_rcpt</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$bcc</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a630"></a>      <span class="src-sym">}</span></li>
<li><a name="a631"></a>    <span class="src-sym">}</span></li>
<li><a name="a632"></a>    <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$bad_rcpt</span><span class="src-sym">) </span>&gt; <span class="src-num">0 </span><span class="src-sym">) </span><span class="src-sym">{ </span><span class="src-comm">//Create error message for any bad addresses</span></li>
<li><a name="a633"></a>      <span class="src-var">$badaddresses </span>= <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">', '</span><span class="src-sym">, </span><span class="src-var">$bad_rcpt</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a634"></a>      throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'recipients_failed'</span><span class="src-sym">) </span>. <span class="src-var">$badaddresses</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a635"></a>    <span class="src-sym">}</span></li>
<li><a name="a636"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Data</span><span class="src-sym">(</span><span class="src-var">$header </span>. <span class="src-var">$body</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a637"></a>      throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'data_not_accepted'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a638"></a>    <span class="src-sym">}</span></li>
<li><a name="a639"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$SMTPKeepAlive">SMTPKeepAlive</a> == <span class="src-id">true</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a640"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Reset</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a641"></a>    <span class="src-sym">}</span></li>
<li><a name="a642"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a643"></a>  <span class="src-sym">}</span></li>
<li><a name="a644"></a>&nbsp;</li>
<li><a name="a645"></a>  <span class="src-doc">/**</span></li>
<li><a name="a646"></a><span class="src-doc">   * Initiates a connection to an SMTP server.</span></li>
<li><a name="a647"></a><span class="src-doc">   * Returns false if the operation failed.</span></li>
<li><a name="a648"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> SMTP</span></li>
<li><a name="a649"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a650"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a651"></a><span class="src-doc">   */</span></li>
<li><a name="a652"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSmtpConnect">SmtpConnect</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a653"></a>    <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a654"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/SMTP.html">SMTP</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a655"></a>    <span class="src-sym">}</span></li>
<li><a name="a656"></a>&nbsp;</li>
<li><a name="a657"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">do_debug </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$SMTPDebug">SMTPDebug</a><span class="src-sym">;</span></li>
<li><a name="a658"></a>    <span class="src-var">$hosts </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">';'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Host">Host</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a659"></a>    <span class="src-var">$index </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a660"></a>    <span class="src-var">$connection </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Connected</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a661"></a>&nbsp;</li>
<li><a name="a662"></a>    <span class="src-comm">// Retry while there is no connection</span></li>
<li><a name="a663"></a>    try <span class="src-sym">{</span></li>
<li><a name="a664"></a>      <span class="src-key">while</span><span class="src-sym">(</span><span class="src-var">$index </span>&lt; <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$hosts</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">!</span><span class="src-var">$connection</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a665"></a>        <span class="src-var">$hostinfo </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a666"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'/^(.+):([0-9]+)$/'</span><span class="src-sym">, </span><span class="src-var">$hosts</span><span class="src-sym">[</span><span class="src-var">$index</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$hostinfo</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a667"></a>          <span class="src-var">$host </span>= <span class="src-var">$hostinfo</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a668"></a>          <span class="src-var">$port </span>= <span class="src-var">$hostinfo</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a669"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a670"></a>          <span class="src-var">$host </span>= <span class="src-var">$hosts</span><span class="src-sym">[</span><span class="src-var">$index</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a671"></a>          <span class="src-var">$port </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Port">Port</a><span class="src-sym">;</span></li>
<li><a name="a672"></a>        <span class="src-sym">}</span></li>
<li><a name="a673"></a>&nbsp;</li>
<li><a name="a674"></a>        <span class="src-var">$tls </span>= <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$SMTPSecure">SMTPSecure</a> == <span class="src-str">'tls'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a675"></a>        <span class="src-var">$ssl </span>= <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$SMTPSecure">SMTPSecure</a> == <span class="src-str">'ssl'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a676"></a>&nbsp;</li>
<li><a name="a677"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Connect</span><span class="src-sym">((</span><span class="src-var">$ssl </span>? <span class="src-str">'ssl://'</span>:<span class="src-str">''</span><span class="src-sym">)</span>.<span class="src-var">$host</span><span class="src-sym">, </span><span class="src-var">$port</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Timeout">Timeout</a><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a678"></a>&nbsp;</li>
<li><a name="a679"></a>          <span class="src-var">$hello </span>= <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Helo">Helo</a> != <span class="src-str">'' </span>? <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Helo">Helo</a> : <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">ServerHostname</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a680"></a>          <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Hello</span><span class="src-sym">(</span><span class="src-var">$hello</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a681"></a>&nbsp;</li>
<li><a name="a682"></a>          <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$tls</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a683"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">StartTLS</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a684"></a>              throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'tls'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a685"></a>            <span class="src-sym">}</span></li>
<li><a name="a686"></a>&nbsp;</li>
<li><a name="a687"></a>            <span class="src-comm">//We must resend HELO after tls negotiation</span></li>
<li><a name="a688"></a>            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Hello</span><span class="src-sym">(</span><span class="src-var">$hello</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a689"></a>          <span class="src-sym">}</span></li>
<li><a name="a690"></a>&nbsp;</li>
<li><a name="a691"></a>          <span class="src-var">$connection </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a692"></a>          <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$SMTPAuth">SMTPAuth</a><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a693"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Authenticate</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Username">Username</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Password">Password</a><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a694"></a>              throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'authenticate'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a695"></a>            <span class="src-sym">}</span></li>
<li><a name="a696"></a>          <span class="src-sym">}</span></li>
<li><a name="a697"></a>        <span class="src-sym">}</span></li>
<li><a name="a698"></a>        <span class="src-var">$index</span>++<span class="src-sym">;</span></li>
<li><a name="a699"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$connection</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a700"></a>          throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'connect_host'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a701"></a>        <span class="src-sym">}</span></li>
<li><a name="a702"></a>      <span class="src-sym">}</span></li>
<li><a name="a703"></a>    <span class="src-sym">} </span>catch <span class="src-sym">(</span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a> </span><span class="src-var">$e</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a704"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Reset</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a705"></a>      throw <span class="src-var">$e</span><span class="src-sym">;</span></li>
<li><a name="a706"></a>    <span class="src-sym">}</span></li>
<li><a name="a707"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a708"></a>  <span class="src-sym">}</span></li>
<li><a name="a709"></a>&nbsp;</li>
<li><a name="a710"></a>  <span class="src-doc">/**</span></li>
<li><a name="a711"></a><span class="src-doc">   * Closes the active SMTP session if one exists.</span></li>
<li><a name="a712"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a713"></a><span class="src-doc">   */</span></li>
<li><a name="a714"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSmtpClose">SmtpClose</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a715"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a716"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Connected</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a717"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Quit</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a718"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">Close</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a719"></a>      <span class="src-sym">}</span></li>
<li><a name="a720"></a>    <span class="src-sym">}</span></li>
<li><a name="a721"></a>  <span class="src-sym">}</span></li>
<li><a name="a722"></a>&nbsp;</li>
<li><a name="a723"></a>  <span class="src-doc">/**</span></li>
<li><a name="a724"></a><span class="src-doc">  * Sets the language for all class error messages.</span></li>
<li><a name="a725"></a><span class="src-doc">  * Returns false if it cannot load the language file.  The default language is English.</span></li>
<li><a name="a726"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$langcode </span><span class="src-doc">ISO 639-1 2-character language code (e.g. Portuguese: &quot;br&quot;)</span></li>
<li><a name="a727"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$lang_path </span><span class="src-doc">Path to the language file directory</span></li>
<li><a name="a728"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a729"></a><span class="src-doc">  */</span></li>
<li><a name="a730"></a>  <span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSetLanguage">SetLanguage</a><span class="src-sym">(</span><span class="src-var">$langcode </span>= <span class="src-str">'en'</span><span class="src-sym">, </span><span class="src-var">$lang_path </span>= <span class="src-str">'language/'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a731"></a>    <span class="src-comm">//Define full set of translatable strings</span></li>
<li><a name="a732"></a>    <span class="src-var">$PHPMAILER_LANG </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a733"></a>      <span class="src-str">'provide_address' </span>=&gt; <span class="src-str">'You must provide at least one recipient email address.'</span><span class="src-sym">,</span></li>
<li><a name="a734"></a>      <span class="src-str">'mailer_not_supported' </span>=&gt; <span class="src-str">' mailer is not supported.'</span><span class="src-sym">,</span></li>
<li><a name="a735"></a>      <span class="src-str">'execute' </span>=&gt; <span class="src-str">'Could not execute: '</span><span class="src-sym">,</span></li>
<li><a name="a736"></a>      <span class="src-str">'instantiate' </span>=&gt; <span class="src-str">'Could not instantiate mail function.'</span><span class="src-sym">,</span></li>
<li><a name="a737"></a>      <span class="src-str">'authenticate' </span>=&gt; <span class="src-str">'SMTP Error: Could not authenticate.'</span><span class="src-sym">,</span></li>
<li><a name="a738"></a>      <span class="src-str">'from_failed' </span>=&gt; <span class="src-str">'The following From address failed: '</span><span class="src-sym">,</span></li>
<li><a name="a739"></a>      <span class="src-str">'recipients_failed' </span>=&gt; <span class="src-str">'SMTP Error: The following recipients failed: '</span><span class="src-sym">,</span></li>
<li><a name="a740"></a>      <span class="src-str">'data_not_accepted' </span>=&gt; <span class="src-str">'SMTP Error: Data not accepted.'</span><span class="src-sym">,</span></li>
<li><a name="a741"></a>      <span class="src-str">'connect_host' </span>=&gt; <span class="src-str">'SMTP Error: Could not connect to SMTP host.'</span><span class="src-sym">,</span></li>
<li><a name="a742"></a>      <span class="src-str">'file_access' </span>=&gt; <span class="src-str">'Could not access file: '</span><span class="src-sym">,</span></li>
<li><a name="a743"></a>      <span class="src-str">'file_open' </span>=&gt; <span class="src-str">'File Error: Could not open file: '</span><span class="src-sym">,</span></li>
<li><a name="a744"></a>      <span class="src-str">'encoding' </span>=&gt; <span class="src-str">'Unknown encoding: '</span><span class="src-sym">,</span></li>
<li><a name="a745"></a>      <span class="src-str">'signing' </span>=&gt; <span class="src-str">'Signing Error: '</span><span class="src-sym">,</span></li>
<li><a name="a746"></a>      <span class="src-str">'smtp_error' </span>=&gt; <span class="src-str">'SMTP server error: '</span><span class="src-sym">,</span></li>
<li><a name="a747"></a>      <span class="src-str">'empty_message' </span>=&gt; <span class="src-str">'Message body empty'</span><span class="src-sym">,</span></li>
<li><a name="a748"></a>      <span class="src-str">'invalid_address' </span>=&gt; <span class="src-str">'Invalid address'</span><span class="src-sym">,</span></li>
<li><a name="a749"></a>      <span class="src-str">'variable_set' </span>=&gt; <span class="src-str">'Cannot set or reset variable: '</span></li>
<li><a name="a750"></a>    <span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a751"></a>    <span class="src-comm">//Overwrite language-specific strings. This way we'll never have missing translations - no more &quot;language string failed to load&quot;!</span></li>
<li><a name="a752"></a>    <span class="src-var">$l </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a753"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$langcode </span>!= <span class="src-str">'en'</span><span class="src-sym">) </span><span class="src-sym">{ </span><span class="src-comm">//There is no English translation file</span></li>
<li><a name="a754"></a>      <span class="src-var">$l </span>= <span class="src-sym">@</span><span class="src-inc">include </span><span class="src-var">$lang_path</span>.<span class="src-str">'phpmailer.lang-'</span>.<span class="src-var">$langcode</span>.<span class="src-str">'.php'</span><span class="src-sym">;</span></li>
<li><a name="a755"></a>    <span class="src-sym">}</span></li>
<li><a name="a756"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$language">language</a> = <span class="src-var">$PHPMAILER_LANG</span><span class="src-sym">;</span></li>
<li><a name="a757"></a>    <span class="src-key">return </span><span class="src-sym">(</span><span class="src-var">$l </span>== <span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//Returns false if language not found</span></li>
<li><a name="a758"></a>  <span class="src-sym">}</span></li>
<li><a name="a759"></a>&nbsp;</li>
<li><a name="a760"></a>  <span class="src-doc">/**</span></li>
<li><a name="a761"></a><span class="src-doc">  * Return the current array of language strings</span></li>
<li><a name="a762"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">array </span></li>
<li><a name="a763"></a><span class="src-doc">  */</span></li>
<li><a name="a764"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodGetTranslations">GetTranslations</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a765"></a>    <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$language">language</a><span class="src-sym">;</span></li>
<li><a name="a766"></a>  <span class="src-sym">}</span></li>
<li><a name="a767"></a>&nbsp;</li>
<li><a name="a768"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a769"></a>  <span class="src-comm">// METHODS, MESSAGE CREATION</span></li>
<li><a name="a770"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a771"></a>&nbsp;</li>
<li><a name="a770"></a>  </li>
<li><a name="a771"></a>&nbsp;</li>
<li><a name="a772"></a>  <span class="src-doc">/**</span></li>
<li><a name="a773"></a><span class="src-doc">   * Creates recipient headers.</span></li>
<li><a name="a774"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a775"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a776"></a><span class="src-doc">   */</span></li>
<li><a name="a777"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddrAppend">AddrAppend</a><span class="src-sym">(</span><span class="src-var">$type</span><span class="src-sym">, </span><span class="src-var">$addr</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a778"></a>    <span class="src-var">$addr_str </span>= <span class="src-var">$type </span>. <span class="src-str">': '</span><span class="src-sym">;</span></li>
<li><a name="a779"></a>    <span class="src-var">$addresses </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a780"></a>    <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$addr </span><span class="src-key">as </span><span class="src-var">$a</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a781"></a>      <span class="src-var">$addresses</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodAddrFormat">AddrFormat</a><span class="src-sym">(</span><span class="src-var">$a</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a782"></a>    <span class="src-sym">}</span></li>
<li><a name="a783"></a>    <span class="src-var">$addr_str </span>.= <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">', '</span><span class="src-sym">, </span><span class="src-var">$addresses</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a784"></a>    <span class="src-var">$addr_str </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a785"></a>&nbsp;</li>
<li><a name="a786"></a>    <span class="src-key">return </span><span class="src-var">$addr_str</span><span class="src-sym">;</span></li>
<li><a name="a787"></a>  <span class="src-sym">}</span></li>
<li><a name="a788"></a>&nbsp;</li>
<li><a name="a789"></a>  <span class="src-doc">/**</span></li>
<li><a name="a790"></a><span class="src-doc">   * Formats an address correctly.</span></li>
<li><a name="a791"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a792"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a793"></a><span class="src-doc">   */</span></li>
<li><a name="a794"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddrFormat">AddrFormat</a><span class="src-sym">(</span><span class="src-var">$addr</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a795"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$addr</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a796"></a>      <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$addr</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a797"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a798"></a>      <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$addr</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-str">'phrase'</span><span class="src-sym">) </span>. <span class="src-str">&quot; &lt;&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$addr</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">) </span>. <span class="src-str">&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a799"></a>    <span class="src-sym">}</span></li>
<li><a name="a800"></a>  <span class="src-sym">}</span></li>
<li><a name="a801"></a>&nbsp;</li>
<li><a name="a802"></a>  <span class="src-doc">/**</span></li>
<li><a name="a803"></a><span class="src-doc">   * Wraps message for use with mailers that do not</span></li>
<li><a name="a804"></a><span class="src-doc">   * automatically perform wrapping and for quoted-printable.</span></li>
<li><a name="a805"></a><span class="src-doc">   * Original written by philippe.</span></li>
<li><a name="a806"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$message </span><span class="src-doc">The message to wrap</span></li>
<li><a name="a807"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$length </span><span class="src-doc">The line length to wrap to</span></li>
<li><a name="a808"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$qp_mode </span><span class="src-doc">Whether to run in Quoted-Printable mode</span></li>
<li><a name="a809"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a810"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a811"></a><span class="src-doc">   */</span></li>
<li><a name="a812"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodWrapText">WrapText</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">, </span><span class="src-var">$length</span><span class="src-sym">, </span><span class="src-var">$qp_mode </span>= <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a813"></a>    <span class="src-var">$soft_break </span>= <span class="src-sym">(</span><span class="src-var">$qp_mode</span><span class="src-sym">) </span>? <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot; =%s&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">) </span>: <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a814"></a>    <span class="src-comm">// If utf-8 encoding is used, we will need to make sure we don't</span></li>
<li><a name="a815"></a>    <span class="src-comm">// split multibyte characters when we wrap</span></li>
<li><a name="a816"></a>    <span class="src-var">$is_utf8 </span>= <span class="src-sym">(</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$CharSet">CharSet</a><span class="src-sym">) </span>== <span class="src-str">&quot;utf-8&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a817"></a>&nbsp;</li>
<li><a name="a818"></a>    <span class="src-var">$message </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">FixEOL</span><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a819"></a>    <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">, </span>-<span class="src-num">1</span><span class="src-sym">) </span>== <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a820"></a>      <span class="src-var">$message </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span>-<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a821"></a>    <span class="src-sym">}</span></li>
<li><a name="a822"></a>&nbsp;</li>
<li><a name="a823"></a>    <span class="src-var">$line </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">, </span><span class="src-var">$message</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a824"></a>    <span class="src-var">$message </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a825"></a>    <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-num">0 </span><span class="src-sym">;</span><span class="src-var">$i </span>&lt; <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-var">$i</span>++<span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a826"></a>      <span class="src-var">$line_part </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">, </span><span class="src-var">$line</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a827"></a>      <span class="src-var">$buf </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a828"></a>      <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$e </span>= <span class="src-num">0</span><span class="src-sym">; </span><span class="src-var">$e</span>&lt;<a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$line_part</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-var">$e</span>++<span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a829"></a>        <span class="src-var">$word </span>= <span class="src-var">$line_part</span><span class="src-sym">[</span><span class="src-var">$e</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a830"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$qp_mode </span><span class="src-key">and </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">) </span>&gt; <span class="src-var">$length</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a831"></a>          <span class="src-var">$space_left </span>= <span class="src-var">$length </span>- <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$buf</span><span class="src-sym">) </span>- <span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a832"></a>          <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a833"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$space_left </span>&gt; <span class="src-num">20</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a834"></a>              <span class="src-var">$len </span>= <span class="src-var">$space_left</span><span class="src-sym">;</span></li>
<li><a name="a835"></a>              <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$is_utf8</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a836"></a>                <span class="src-var">$len </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodUTF8CharBoundary">UTF8CharBoundary</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-var">$len</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a837"></a>              <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-var">$len </span>- <span class="src-num">1</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">) </span>== <span class="src-str">&quot;=&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a838"></a>                <span class="src-var">$len</span>--<span class="src-sym">;</span></li>
<li><a name="a839"></a>              <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-var">$len </span>- <span class="src-num">2</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">) </span>== <span class="src-str">&quot;=&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a840"></a>                <span class="src-var">$len </span>-= <span class="src-num">2</span><span class="src-sym">;</span></li>
<li><a name="a841"></a>              <span class="src-sym">}</span></li>
<li><a name="a842"></a>              <span class="src-var">$part </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-var">$len</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a843"></a>              <span class="src-var">$word </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-var">$len</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a844"></a>              <span class="src-var">$buf </span>.= <span class="src-str">' ' </span>. <span class="src-var">$part</span><span class="src-sym">;</span></li>
<li><a name="a845"></a>              <span class="src-var">$message </span>.= <span class="src-var">$buf </span>. <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;=%s&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a846"></a>            <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a847"></a>              <span class="src-var">$message </span>.= <span class="src-var">$buf </span>. <span class="src-var">$soft_break</span><span class="src-sym">;</span></li>
<li><a name="a848"></a>            <span class="src-sym">}</span></li>
<li><a name="a849"></a>            <span class="src-var">$buf </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a850"></a>          <span class="src-sym">}</span></li>
<li><a name="a851"></a>          <span class="src-key">while </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">) </span>&gt; <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a852"></a>            <span class="src-var">$len </span>= <span class="src-var">$length</span><span class="src-sym">;</span></li>
<li><a name="a853"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$is_utf8</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a854"></a>              <span class="src-var">$len </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodUTF8CharBoundary">UTF8CharBoundary</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-var">$len</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a855"></a>            <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-var">$len </span>- <span class="src-num">1</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">) </span>== <span class="src-str">&quot;=&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a856"></a>              <span class="src-var">$len</span>--<span class="src-sym">;</span></li>
<li><a name="a857"></a>            <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-var">$len </span>- <span class="src-num">2</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">) </span>== <span class="src-str">&quot;=&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a858"></a>              <span class="src-var">$len </span>-= <span class="src-num">2</span><span class="src-sym">;</span></li>
<li><a name="a859"></a>            <span class="src-sym">}</span></li>
<li><a name="a860"></a>            <span class="src-var">$part </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-var">$len</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a861"></a>            <span class="src-var">$word </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">, </span><span class="src-var">$len</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a862"></a>&nbsp;</li>
<li><a name="a863"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$word</span><span class="src-sym">) </span>&gt; <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a864"></a>              <span class="src-var">$message </span>.= <span class="src-var">$part </span>. <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;=%s&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a865"></a>            <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a866"></a>              <span class="src-var">$buf </span>= <span class="src-var">$part</span><span class="src-sym">;</span></li>
<li><a name="a867"></a>            <span class="src-sym">}</span></li>
<li><a name="a868"></a>          <span class="src-sym">}</span></li>
<li><a name="a869"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a870"></a>          <span class="src-var">$buf_o </span>= <span class="src-var">$buf</span><span class="src-sym">;</span></li>
<li><a name="a871"></a>          <span class="src-var">$buf </span>.= <span class="src-sym">(</span><span class="src-var">$e </span>== <span class="src-num">0</span><span class="src-sym">) </span>? <span class="src-var">$word </span>: <span class="src-sym">(</span><span class="src-str">' ' </span>. <span class="src-var">$word</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a872"></a>&nbsp;</li>
<li><a name="a873"></a>          <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$buf</span><span class="src-sym">) </span>&gt; <span class="src-var">$length </span><span class="src-key">and </span><span class="src-var">$buf_o </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a874"></a>            <span class="src-var">$message </span>.= <span class="src-var">$buf_o </span>. <span class="src-var">$soft_break</span><span class="src-sym">;</span></li>
<li><a name="a875"></a>            <span class="src-var">$buf </span>= <span class="src-var">$word</span><span class="src-sym">;</span></li>
<li><a name="a876"></a>          <span class="src-sym">}</span></li>
<li><a name="a877"></a>        <span class="src-sym">}</span></li>
<li><a name="a878"></a>      <span class="src-sym">}</span></li>
<li><a name="a879"></a>      <span class="src-var">$message </span>.= <span class="src-var">$buf </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a880"></a>    <span class="src-sym">}</span></li>
<li><a name="a881"></a>&nbsp;</li>
<li><a name="a882"></a>    <span class="src-key">return </span><span class="src-var">$message</span><span class="src-sym">;</span></li>
<li><a name="a883"></a>  <span class="src-sym">}</span></li>
<li><a name="a884"></a>&nbsp;</li>
<li><a name="a885"></a>  <span class="src-doc">/**</span></li>
<li><a name="a886"></a><span class="src-doc">   * Finds last character boundary prior to maxLength in a utf-8</span></li>
<li><a name="a887"></a><span class="src-doc">   * quoted (printable) encoded string.</span></li>
<li><a name="a888"></a><span class="src-doc">   * Original written by Colin Brown.</span></li>
<li><a name="a889"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a890"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$encodedText </span><span class="src-doc">utf-8 QP text</span></li>
<li><a name="a891"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc">   </span><span class="src-doc-var">$maxLength </span><span class="src-doc">  find last character boundary prior to this length</span></li>
<li><a name="a892"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">int </span></li>
<li><a name="a893"></a><span class="src-doc">   */</span></li>
<li><a name="a894"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodUTF8CharBoundary">UTF8CharBoundary</a><span class="src-sym">(</span><span class="src-var">$encodedText</span><span class="src-sym">, </span><span class="src-var">$maxLength</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a895"></a>    <span class="src-var">$foundSplitPos </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a896"></a>    <span class="src-var">$lookBack </span>= <span class="src-num">3</span><span class="src-sym">;</span></li>
<li><a name="a897"></a>    <span class="src-key">while </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$foundSplitPos</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a898"></a>      <span class="src-var">$lastChunk </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$encodedText</span><span class="src-sym">, </span><span class="src-var">$maxLength </span>- <span class="src-var">$lookBack</span><span class="src-sym">, </span><span class="src-var">$lookBack</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a899"></a>      <span class="src-var">$encodedCharPos </span>= <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$lastChunk</span><span class="src-sym">, </span><span class="src-str">&quot;=&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a900"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$encodedCharPos </span>!== <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a901"></a>        <span class="src-comm">// Found start of encoded character byte within $lookBack block.</span></li>
<li><a name="a902"></a>        <span class="src-comm">// Check the encoded byte value (the 2 chars after the '=')</span></li>
<li><a name="a903"></a>        <span class="src-var">$hex </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$encodedText</span><span class="src-sym">, </span><span class="src-var">$maxLength </span>- <span class="src-var">$lookBack </span>+ <span class="src-var">$encodedCharPos </span>+ <span class="src-num">1</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a904"></a>        <span class="src-var">$dec </span>= <a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><span class="src-var">$hex</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a905"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$dec </span>&lt; <span class="src-num">128</span><span class="src-sym">) </span><span class="src-sym">{ </span><span class="src-comm">// Single byte character.</span></li>
<li><a name="a906"></a>          <span class="src-comm">// If the encoded char was found at pos 0, it will fit</span></li>
<li><a name="a907"></a>          <span class="src-comm">// otherwise reduce maxLength to start of the encoded char</span></li>
<li><a name="a908"></a>          <span class="src-var">$maxLength </span>= <span class="src-sym">(</span><span class="src-var">$encodedCharPos </span>== <span class="src-num">0</span><span class="src-sym">) </span>? <span class="src-var">$maxLength </span>:</li>
<li><a name="a909"></a>          <span class="src-var">$maxLength </span>- <span class="src-sym">(</span><span class="src-var">$lookBack </span>- <span class="src-var">$encodedCharPos</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a910"></a>          <span class="src-var">$foundSplitPos </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a911"></a>        <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><span class="src-var">$dec </span>&gt;= <span class="src-num">192</span><span class="src-sym">) </span><span class="src-sym">{ </span><span class="src-comm">// First byte of a multi byte character</span></li>
<li><a name="a912"></a>          <span class="src-comm">// Reduce maxLength to split at start of character</span></li>
<li><a name="a913"></a>          <span class="src-var">$maxLength </span>= <span class="src-var">$maxLength </span>- <span class="src-sym">(</span><span class="src-var">$lookBack </span>- <span class="src-var">$encodedCharPos</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a914"></a>          <span class="src-var">$foundSplitPos </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a915"></a>        <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><span class="src-var">$dec </span>&lt; <span class="src-num">192</span><span class="src-sym">) </span><span class="src-sym">{ </span><span class="src-comm">// Middle byte of a multi byte character, look further back</span></li>
<li><a name="a916"></a>          <span class="src-var">$lookBack </span>+= <span class="src-num">3</span><span class="src-sym">;</span></li>
<li><a name="a917"></a>        <span class="src-sym">}</span></li>
<li><a name="a918"></a>      <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a919"></a>        <span class="src-comm">// No encoded character found</span></li>
<li><a name="a920"></a>        <span class="src-var">$foundSplitPos </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a921"></a>      <span class="src-sym">}</span></li>
<li><a name="a922"></a>    <span class="src-sym">}</span></li>
<li><a name="a923"></a>    <span class="src-key">return </span><span class="src-var">$maxLength</span><span class="src-sym">;</span></li>
<li><a name="a924"></a>  <span class="src-sym">}</span></li>
<li><a name="a925"></a>&nbsp;</li>
<li><a name="a926"></a>&nbsp;</li>
<li><a name="a927"></a>  <span class="src-doc">/**</span></li>
<li><a name="a928"></a><span class="src-doc">   * Set the body wrapping.</span></li>
<li><a name="a929"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a930"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a931"></a><span class="src-doc">   */</span></li>
<li><a name="a932"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSetWordWrap">SetWordWrap</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a933"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$WordWrap">WordWrap</a> &lt; <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a934"></a>      <span class="src-key">return</span><span class="src-sym">;</span></li>
<li><a name="a935"></a>    <span class="src-sym">}</span></li>
<li><a name="a936"></a>&nbsp;</li>
<li><a name="a937"></a>    <span class="src-key">switch</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">message_type</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a938"></a>      <span class="src-key">case </span><span class="src-str">'alt'</span>:</li>
<li><a name="a939"></a>      <span class="src-key">case </span><span class="src-str">'alt_attachments'</span>:</li>
<li><a name="a940"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a> = <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodWrapText">WrapText</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$WordWrap">WordWrap</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a941"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a942"></a>      <span class="src-key">default</span>:</li>
<li><a name="a943"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Body">Body</a> = <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodWrapText">WrapText</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Body">Body</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$WordWrap">WordWrap</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a944"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a945"></a>    <span class="src-sym">}</span></li>
<li><a name="a946"></a>  <span class="src-sym">}</span></li>
<li><a name="a947"></a>&nbsp;</li>
<li><a name="a948"></a>  <span class="src-doc">/**</span></li>
<li><a name="a949"></a><span class="src-doc">   * Assembles message header.</span></li>
<li><a name="a950"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a951"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span><span class="src-doc">The assembled header</span></li>
<li><a name="a952"></a><span class="src-doc">   */</span></li>
<li><a name="a953"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodCreateHeader">CreateHeader</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a954"></a>    <span class="src-var">$result </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a955"></a>&nbsp;</li>
<li><a name="a956"></a>    <span class="src-comm">// Set the boundaries</span></li>
<li><a name="a957"></a>    <span class="src-var">$uniq_id </span>= <a href="http://www.php.net/md5">md5</a><span class="src-sym">(</span><a href="http://www.php.net/uniqid">uniqid</a><span class="src-sym">(</span><a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a958"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>= <span class="src-str">'b1_' </span>. <span class="src-var">$uniq_id</span><span class="src-sym">;</span></li>
<li><a name="a959"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">] </span>= <span class="src-str">'b2_' </span>. <span class="src-var">$uniq_id</span><span class="src-sym">;</span></li>
<li><a name="a960"></a>&nbsp;</li>
<li><a name="a961"></a>    <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Date'</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">RFCDate</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a962"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sender">Sender</a> == <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a963"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Return-Path'</span><span class="src-sym">, </span><a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$From">From</a><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a964"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a965"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Return-Path'</span><span class="src-sym">, </span><a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Sender">Sender</a><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a966"></a>    <span class="src-sym">}</span></li>
<li><a name="a967"></a>&nbsp;</li>
<li><a name="a968"></a>    <span class="src-comm">// To be created automatically by mail()</span></li>
<li><a name="a969"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> != <span class="src-str">'mail'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a970"></a>      <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">to</span><span class="src-sym">) </span>&gt; <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a971"></a>        <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodAddrAppend">AddrAppend</a><span class="src-sym">(</span><span class="src-str">'To'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">to</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a972"></a>      <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">cc</span><span class="src-sym">) </span>== <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a973"></a>        <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'To'</span><span class="src-sym">, </span><span class="src-str">'undisclosed-recipients:;'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a974"></a>      <span class="src-sym">}</span></li>
<li><a name="a975"></a>    <span class="src-sym">}</span></li>
<li><a name="a976"></a>&nbsp;</li>
<li><a name="a977"></a>    <span class="src-var">$from </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a978"></a>    <span class="src-var">$from</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">] </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$From">From</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a979"></a>    <span class="src-var">$from</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$FromName">FromName</a><span class="src-sym">;</span></li>
<li><a name="a980"></a>    <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodAddrAppend">AddrAppend</a><span class="src-sym">(</span><span class="src-str">'From'</span><span class="src-sym">, </span><span class="src-var">$from</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a981"></a>&nbsp;</li>
<li><a name="a982"></a>    <span class="src-comm">// sendmail and mail() extract Cc from the header before sending</span></li>
<li><a name="a983"></a>    <span class="src-key">if</span><span class="src-sym">(((</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> == <span class="src-str">'sendmail'</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> == <span class="src-str">'mail'</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">cc</span><span class="src-sym">) </span>&gt; <span class="src-num">0</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a984"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodAddrAppend">AddrAppend</a><span class="src-sym">(</span><span class="src-str">'Cc'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">cc</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a985"></a>    <span class="src-sym">}</span></li>
<li><a name="a986"></a>&nbsp;</li>
<li><a name="a987"></a>    <span class="src-comm">// sendmail and mail() extract Bcc from the header before sending</span></li>
<li><a name="a988"></a>    <span class="src-key">if</span><span class="src-sym">(((</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> == <span class="src-str">'sendmail'</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> == <span class="src-str">'mail'</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">bcc</span><span class="src-sym">) </span>&gt; <span class="src-num">0</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a989"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodAddrAppend">AddrAppend</a><span class="src-sym">(</span><span class="src-str">'Bcc'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">bcc</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a990"></a>    <span class="src-sym">}</span></li>
<li><a name="a991"></a>&nbsp;</li>
<li><a name="a992"></a>    <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">ReplyTo</span><span class="src-sym">) </span>&gt; <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a993"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodAddrAppend">AddrAppend</a><span class="src-sym">(</span><span class="src-str">'Reply-to'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">ReplyTo</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a994"></a>    <span class="src-sym">}</span></li>
<li><a name="a995"></a>&nbsp;</li>
<li><a name="a996"></a>    <span class="src-comm">// mail() sets the subject itself</span></li>
<li><a name="a997"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> != <span class="src-str">'mail'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a998"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Subject'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Subject">Subject</a><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a999"></a>    <span class="src-sym">}</span></li>
<li><a name="a1000"></a>&nbsp;</li>
<li><a name="a1001"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$MessageID">MessageID</a> != <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1002"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Message-ID'</span><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$MessageID">MessageID</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1003"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1004"></a>      <span class="src-var">$result </span>.= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Message-ID: &lt;%s@%s&gt;%s&quot;</span><span class="src-sym">, </span><span class="src-var">$uniq_id</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">ServerHostname</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1005"></a>    <span class="src-sym">}</span></li>
<li><a name="a1006"></a>    <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'X-Priority'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Priority">Priority</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1007"></a>    <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'X-Mailer'</span><span class="src-sym">, </span><span class="src-str">'PHPMailer ' </span>. <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">VERSION </span>. <span class="src-str">' (phpmailer.codeworxtech.com)'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1008"></a>&nbsp;</li>
<li><a name="a1009"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$ConfirmReadingTo">ConfirmReadingTo</a> != <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1010"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Disposition-Notification-To'</span><span class="src-sym">, </span><span class="src-str">'&lt;' </span>. <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$ConfirmReadingTo">ConfirmReadingTo</a><span class="src-sym">) </span>. <span class="src-str">'&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1011"></a>    <span class="src-sym">}</span></li>
<li><a name="a1012"></a>&nbsp;</li>
<li><a name="a1013"></a>    <span class="src-comm">// Add custom headers</span></li>
<li><a name="a1014"></a>    <span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$index </span>= <span class="src-num">0</span><span class="src-sym">; </span><span class="src-var">$index </span>&lt; <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">CustomHeader</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-var">$index</span>++<span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1015"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">CustomHeader</span><span class="src-sym">[</span><span class="src-var">$index</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">CustomHeader</span><span class="src-sym">[</span><span class="src-var">$index</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a1016"></a>    <span class="src-sym">}</span></li>
<li><a name="a1017"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">sign_key_file</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1018"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'MIME-Version'</span><span class="src-sym">, </span><span class="src-str">'1.0'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1019"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodGetMailMIME">GetMailMIME</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1020"></a>    <span class="src-sym">}</span></li>
<li><a name="a1021"></a>&nbsp;</li>
<li><a name="a1022"></a>    <span class="src-key">return </span><span class="src-var">$result</span><span class="src-sym">;</span></li>
<li><a name="a1023"></a>  <span class="src-sym">}</span></li>
<li><a name="a1024"></a>&nbsp;</li>
<li><a name="a1025"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1026"></a><span class="src-doc">   * Returns the message MIME.</span></li>
<li><a name="a1027"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1028"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1029"></a><span class="src-doc">   */</span></li>
<li><a name="a1030"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodGetMailMIME">GetMailMIME</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1031"></a>    <span class="src-var">$result </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1032"></a>    <span class="src-key">switch</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">message_type</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1033"></a>      <span class="src-key">case </span><span class="src-str">'plain'</span>:</li>
<li><a name="a1034"></a>        <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Content-Transfer-Encoding'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Encoding">Encoding</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1035"></a>        <span class="src-var">$result </span>.= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Content-Type: %s; charset=\&quot;%s\&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$ContentType">ContentType</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$CharSet">CharSet</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1036"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1037"></a>      <span class="src-key">case </span><span class="src-str">'attachments'</span>:</li>
<li><a name="a1038"></a>      <span class="src-key">case </span><span class="src-str">'alt_attachments'</span>:</li>
<li><a name="a1039"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodInlineImageExists">InlineImageExists</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">{</span></li>
<li><a name="a1040"></a>          <span class="src-var">$result </span>.= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Content-Type: %s;%s\ttype=\&quot;text/html\&quot;;%s\tboundary=\&quot;%s\&quot;%s&quot;</span><span class="src-sym">, </span><span class="src-str">'multipart/related'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1041"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1042"></a>          <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Content-Type'</span><span class="src-sym">, </span><span class="src-str">'multipart/mixed;'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1043"></a>          <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodTextLine">TextLine</a><span class="src-sym">(</span><span class="src-str">&quot;\tboundary=\&quot;&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>. <span class="src-str">'&quot;'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1044"></a>        <span class="src-sym">}</span></li>
<li><a name="a1045"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1046"></a>      <span class="src-key">case </span><span class="src-str">'alt'</span>:</li>
<li><a name="a1047"></a>        <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Content-Type'</span><span class="src-sym">, </span><span class="src-str">'multipart/alternative;'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1048"></a>        <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodTextLine">TextLine</a><span class="src-sym">(</span><span class="src-str">&quot;\tboundary=\&quot;&quot; </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>. <span class="src-str">'&quot;'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1049"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1050"></a>    <span class="src-sym">}</span></li>
<li><a name="a1051"></a>&nbsp;</li>
<li><a name="a1052"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> != <span class="src-str">'mail'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1053"></a>      <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1054"></a>    <span class="src-sym">}</span></li>
<li><a name="a1055"></a>&nbsp;</li>
<li><a name="a1056"></a>    <span class="src-key">return </span><span class="src-var">$result</span><span class="src-sym">;</span></li>
<li><a name="a1057"></a>  <span class="src-sym">}</span></li>
<li><a name="a1058"></a>&nbsp;</li>
<li><a name="a1059"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1060"></a><span class="src-doc">   * Assembles the message body.  Returns an empty string on failure.</span></li>
<li><a name="a1061"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1062"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span><span class="src-doc">The assembled message body</span></li>
<li><a name="a1063"></a><span class="src-doc">   */</span></li>
<li><a name="a1064"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodCreateBody">CreateBody</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1065"></a>    <span class="src-var">$body </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1066"></a>&nbsp;</li>
<li><a name="a1067"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">sign_key_file</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1068"></a>      <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodGetMailMIME">GetMailMIME</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1069"></a>    <span class="src-sym">}</span></li>
<li><a name="a1070"></a>&nbsp;</li>
<li><a name="a1071"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetWordWrap">SetWordWrap</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1072"></a>&nbsp;</li>
<li><a name="a1073"></a>    <span class="src-key">switch</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">message_type</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1074"></a>      <span class="src-key">case </span><span class="src-str">'alt'</span>:</li>
<li><a name="a1075"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">GetBoundary</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-str">'text/plain'</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1076"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeString">EncodeString</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Encoding">Encoding</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1077"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1078"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">GetBoundary</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-str">'text/html'</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1079"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeString">EncodeString</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Body">Body</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Encoding">Encoding</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1080"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1081"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">EndBoundary</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1082"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1083"></a>      <span class="src-key">case </span><span class="src-str">'plain'</span>:</li>
<li><a name="a1084"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeString">EncodeString</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Body">Body</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Encoding">Encoding</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1085"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1086"></a>      <span class="src-key">case </span><span class="src-str">'attachments'</span>:</li>
<li><a name="a1087"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">GetBoundary</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1088"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeString">EncodeString</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Body">Body</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Encoding">Encoding</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1089"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1090"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">AttachAll</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1091"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1092"></a>      <span class="src-key">case </span><span class="src-str">'alt_attachments'</span>:</li>
<li><a name="a1093"></a>        <span class="src-var">$body </span>.= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;--%s%s&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1094"></a>        <span class="src-var">$body </span>.= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Content-Type: %s;%s&quot; </span>. <span class="src-str">&quot;\tboundary=\&quot;%s\&quot;%s&quot;</span><span class="src-sym">, </span><span class="src-str">'multipart/alternative'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1095"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">GetBoundary</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-str">'text/plain'</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">) </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">; </span><span class="src-comm">// Create text body</span></li>
<li><a name="a1096"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeString">EncodeString</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Encoding">Encoding</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1097"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1098"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">GetBoundary</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-str">'text/html'</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">) </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">; </span><span class="src-comm">// Create the HTML body</span></li>
<li><a name="a1099"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeString">EncodeString</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Body">Body</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Encoding">Encoding</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1100"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1101"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">EndBoundary</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1102"></a>        <span class="src-var">$body </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">AttachAll</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1103"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1104"></a>    <span class="src-sym">}</span></li>
<li><a name="a1105"></a>&nbsp;</li>
<li><a name="a1106"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodIsError">IsError</a><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1107"></a>      <span class="src-var">$body </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1108"></a>    <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">sign_key_file</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1109"></a>      try <span class="src-sym">{</span></li>
<li><a name="a1110"></a>        <span class="src-var">$file </span>= <a href="http://www.php.net/tempnam">tempnam</a><span class="src-sym">(</span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-str">'mail'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1111"></a>        <a href="http://www.php.net/file_put_contents">file_put_contents</a><span class="src-sym">(</span><span class="src-var">$file</span><span class="src-sym">, </span><span class="src-var">$body</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//TODO check this worked</span></li>
<li><a name="a1112"></a>        <span class="src-var">$signed </span>= <a href="http://www.php.net/tempnam">tempnam</a><span class="src-sym">(</span><span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;signed&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1113"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">@</span><span class="src-id">openssl_pkcs7_sign</span><span class="src-sym">(</span><span class="src-var">$file</span><span class="src-sym">, </span><span class="src-var">$signed</span><span class="src-sym">, </span><span class="src-str">&quot;file://&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">sign_cert_file</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;file://&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">sign_key_file</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">sign_key_pass</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-id">NULL</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1114"></a>          <span class="src-sym">@</span><a href="http://www.php.net/unlink">unlink</a><span class="src-sym">(</span><span class="src-var">$file</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1115"></a>          <span class="src-sym">@</span><a href="http://www.php.net/unlink">unlink</a><span class="src-sym">(</span><span class="src-var">$signed</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1116"></a>          <span class="src-var">$body </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-var">$signed</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1117"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1118"></a>          <span class="src-sym">@</span><a href="http://www.php.net/unlink">unlink</a><span class="src-sym">(</span><span class="src-var">$file</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1119"></a>          <span class="src-sym">@</span><a href="http://www.php.net/unlink">unlink</a><span class="src-sym">(</span><span class="src-var">$signed</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1120"></a>          throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">&quot;signing&quot;</span><span class="src-sym">)</span>.<span class="src-id">openssl_error_string</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1121"></a>        <span class="src-sym">}</span></li>
<li><a name="a1122"></a>      <span class="src-sym">} </span>catch <span class="src-sym">(</span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a> </span><span class="src-var">$e</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1123"></a>        <span class="src-var">$body </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1124"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">exceptions</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1125"></a>          throw <span class="src-var">$e</span><span class="src-sym">;</span></li>
<li><a name="a1126"></a>        <span class="src-sym">}</span></li>
<li><a name="a1127"></a>      <span class="src-sym">}</span></li>
<li><a name="a1128"></a>    <span class="src-sym">}</span></li>
<li><a name="a1129"></a>&nbsp;</li>
<li><a name="a1130"></a>    <span class="src-key">return </span><span class="src-var">$body</span><span class="src-sym">;</span></li>
<li><a name="a1131"></a>  <span class="src-sym">}</span></li>
<li><a name="a1132"></a>&nbsp;</li>
<li><a name="a1133"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1134"></a><span class="src-doc">   * Returns the start of a message boundary.</span></li>
<li><a name="a1135"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a1136"></a><span class="src-doc">   */</span></li>
<li><a name="a1137"></a>  <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">GetBoundary</span><span class="src-sym">(</span><span class="src-var">$boundary</span><span class="src-sym">, </span><span class="src-var">$charSet</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$encoding</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1138"></a>    <span class="src-var">$result </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1139"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$charSet </span>== <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1140"></a>      <span class="src-var">$charSet </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$CharSet">CharSet</a><span class="src-sym">;</span></li>
<li><a name="a1141"></a>    <span class="src-sym">}</span></li>
<li><a name="a1142"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$contentType </span>== <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1143"></a>      <span class="src-var">$contentType </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$ContentType">ContentType</a><span class="src-sym">;</span></li>
<li><a name="a1144"></a>    <span class="src-sym">}</span></li>
<li><a name="a1145"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$encoding </span>== <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1146"></a>      <span class="src-var">$encoding </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Encoding">Encoding</a><span class="src-sym">;</span></li>
<li><a name="a1147"></a>    <span class="src-sym">}</span></li>
<li><a name="a1148"></a>    <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodTextLine">TextLine</a><span class="src-sym">(</span><span class="src-str">'--' </span>. <span class="src-var">$boundary</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1149"></a>    <span class="src-var">$result </span>.= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Content-Type: %s; charset = \&quot;%s\&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$charSet</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1150"></a>    <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1151"></a>    <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-str">'Content-Transfer-Encoding'</span><span class="src-sym">, </span><span class="src-var">$encoding</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1152"></a>    <span class="src-var">$result </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1153"></a>&nbsp;</li>
<li><a name="a1154"></a>    <span class="src-key">return </span><span class="src-var">$result</span><span class="src-sym">;</span></li>
<li><a name="a1155"></a>  <span class="src-sym">}</span></li>
<li><a name="a1156"></a>&nbsp;</li>
<li><a name="a1157"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1158"></a><span class="src-doc">   * Returns the end of a message boundary.</span></li>
<li><a name="a1159"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a1160"></a><span class="src-doc">   */</span></li>
<li><a name="a1161"></a>  <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">EndBoundary</span><span class="src-sym">(</span><span class="src-var">$boundary</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1162"></a>    <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a> . <span class="src-str">'--' </span>. <span class="src-var">$boundary </span>. <span class="src-str">'--' </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1163"></a>  <span class="src-sym">}</span></li>
<li><a name="a1164"></a>&nbsp;</li>
<li><a name="a1165"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1166"></a><span class="src-doc">   * Sets the message type.</span></li>
<li><a name="a1167"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a1168"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1169"></a><span class="src-doc">   */</span></li>
<li><a name="a1170"></a>  <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">SetMessageType</span><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1171"></a>    <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment</span><span class="src-sym">) </span>&lt; <span class="src-num">1 </span>&amp;&amp; <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a><span class="src-sym">) </span>&lt; <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1172"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">message_type </span>= <span class="src-str">'plain'</span><span class="src-sym">;</span></li>
<li><a name="a1173"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1174"></a>      <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment</span><span class="src-sym">) </span>&gt; <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1175"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">message_type </span>= <span class="src-str">'attachments'</span><span class="src-sym">;</span></li>
<li><a name="a1176"></a>      <span class="src-sym">}</span></li>
<li><a name="a1177"></a>      <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a><span class="src-sym">) </span>&gt; <span class="src-num">0 </span>&amp;&amp; <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment</span><span class="src-sym">) </span>&lt; <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1178"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">message_type </span>= <span class="src-str">'alt'</span><span class="src-sym">;</span></li>
<li><a name="a1179"></a>      <span class="src-sym">}</span></li>
<li><a name="a1180"></a>      <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a><span class="src-sym">) </span>&gt; <span class="src-num">0 </span>&amp;&amp; <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment</span><span class="src-sym">) </span>&gt; <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1181"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">message_type </span>= <span class="src-str">'alt_attachments'</span><span class="src-sym">;</span></li>
<li><a name="a1182"></a>      <span class="src-sym">}</span></li>
<li><a name="a1183"></a>    <span class="src-sym">}</span></li>
<li><a name="a1184"></a>  <span class="src-sym">}</span></li>
<li><a name="a1185"></a>&nbsp;</li>
<li><a name="a1186"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1187"></a><span class="src-doc">   *  Returns a formatted header line.</span></li>
<li><a name="a1188"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1189"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1190"></a><span class="src-doc">   */</span></li>
<li><a name="a1191"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodHeaderLine">HeaderLine</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1192"></a>    <span class="src-key">return </span><span class="src-var">$name </span>. <span class="src-str">': ' </span>. <span class="src-var">$value </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1193"></a>  <span class="src-sym">}</span></li>
<li><a name="a1194"></a>&nbsp;</li>
<li><a name="a1195"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1196"></a><span class="src-doc">   * Returns a formatted mail line.</span></li>
<li><a name="a1197"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1198"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1199"></a><span class="src-doc">   */</span></li>
<li><a name="a1200"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodTextLine">TextLine</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1201"></a>    <span class="src-key">return </span><span class="src-var">$value </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1202"></a>  <span class="src-sym">}</span></li>
<li><a name="a1203"></a>&nbsp;</li>
<li><a name="a1204"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a1205"></a>  <span class="src-comm">// CLASS METHODS, ATTACHMENTS</span></li>
<li><a name="a1206"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a1207"></a>&nbsp;</li>
<li><a name="a1206"></a>  </li>
<li><a name="a1207"></a>&nbsp;</li>
<li><a name="a1208"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1209"></a><span class="src-doc">   * Adds an attachment from a path on the filesystem.</span></li>
<li><a name="a1210"></a><span class="src-doc">   * Returns false if the file could not be found</span></li>
<li><a name="a1211"></a><span class="src-doc">   * or accessed.</span></li>
<li><a name="a1212"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$path </span><span class="src-doc">Path to the attachment.</span></li>
<li><a name="a1213"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$name </span><span class="src-doc">Overrides the attachment name.</span></li>
<li><a name="a1214"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$encoding </span><span class="src-doc">File encoding (see $Encoding).</span></li>
<li><a name="a1215"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$type </span><span class="src-doc">File extension (MIME) type.</span></li>
<li><a name="a1216"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a1217"></a><span class="src-doc">   */</span></li>
<li><a name="a1218"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddAttachment">AddAttachment</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">, </span><span class="src-var">$name </span>= <span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$encoding </span>= <span class="src-str">'base64'</span><span class="src-sym">, </span><span class="src-var">$type </span>= <span class="src-str">'application/octet-stream'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1219"></a>    try <span class="src-sym">{</span></li>
<li><a name="a1220"></a>      <span class="src-key">if </span><span class="src-sym">( </span><span class="src-sym">!</span><span class="src-sym">@</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">) ) </span><span class="src-sym">{</span></li>
<li><a name="a1221"></a>        throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'file_access'</span><span class="src-sym">) </span>. <span class="src-var">$path</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CONTINUE</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1222"></a>      <span class="src-sym">}</span></li>
<li><a name="a1223"></a>      <span class="src-var">$filename </span>= <a href="http://www.php.net/basename">basename</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1224"></a>      <span class="src-key">if </span><span class="src-sym">( </span><span class="src-var">$name </span>== <span class="src-str">'' </span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1225"></a>        <span class="src-var">$name </span>= <span class="src-var">$filename</span><span class="src-sym">;</span></li>
<li><a name="a1226"></a>      <span class="src-sym">}</span></li>
<li><a name="a1227"></a>&nbsp;</li>
<li><a name="a1228"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a1229"></a>        <span class="src-num">0 </span>=&gt; <span class="src-var">$path</span><span class="src-sym">,</span></li>
<li><a name="a1230"></a>        <span class="src-num">1 </span>=&gt; <span class="src-var">$filename</span><span class="src-sym">,</span></li>
<li><a name="a1231"></a>        <span class="src-num">2 </span>=&gt; <span class="src-var">$name</span><span class="src-sym">,</span></li>
<li><a name="a1232"></a>        <span class="src-num">3 </span>=&gt; <span class="src-var">$encoding</span><span class="src-sym">,</span></li>
<li><a name="a1233"></a>        <span class="src-num">4 </span>=&gt; <span class="src-var">$type</span><span class="src-sym">,</span></li>
<li><a name="a1234"></a>        <span class="src-num">5 </span>=&gt; <span class="src-id">false</span><span class="src-sym">,  </span><span class="src-comm">// isStringAttachment</span></li>
<li><a name="a1235"></a>        <span class="src-num">6 </span>=&gt; <span class="src-str">'attachment'</span><span class="src-sym">,</span></li>
<li><a name="a1236"></a>        <span class="src-num">7 </span>=&gt; <span class="src-num">0</span></li>
<li><a name="a1237"></a>      <span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1238"></a>&nbsp;</li>
<li><a name="a1239"></a>    <span class="src-sym">} </span>catch <span class="src-sym">(</span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a> </span><span class="src-var">$e</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1240"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetError">SetError</a><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-&gt;</span><span class="src-id">getMessage</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1241"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">exceptions</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1242"></a>        throw <span class="src-var">$e</span><span class="src-sym">;</span></li>
<li><a name="a1243"></a>      <span class="src-sym">}</span></li>
<li><a name="a1244"></a>      echo <span class="src-var">$e</span><span class="src-sym">-&gt;</span><span class="src-id">getMessage</span><span class="src-sym">(</span><span class="src-sym">)</span>.<span class="src-str">&quot;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1245"></a>      <span class="src-key">if </span><span class="src-sym">( </span><span class="src-var">$e</span><span class="src-sym">-&gt;</span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>== <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL </span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1246"></a>        <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1247"></a>      <span class="src-sym">}</span></li>
<li><a name="a1248"></a>    <span class="src-sym">}</span></li>
<li><a name="a1249"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a1250"></a>  <span class="src-sym">}</span></li>
<li><a name="a1251"></a>&nbsp;</li>
<li><a name="a1252"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1253"></a><span class="src-doc">  * Return the current array of attachments</span></li>
<li><a name="a1254"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">array </span></li>
<li><a name="a1255"></a><span class="src-doc">  */</span></li>
<li><a name="a1256"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodGetAttachments">GetAttachments</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1257"></a>    <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment</span><span class="src-sym">;</span></li>
<li><a name="a1258"></a>  <span class="src-sym">}</span></li>
<li><a name="a1259"></a>&nbsp;</li>
<li><a name="a1260"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1261"></a><span class="src-doc">   * Attaches all fs, string, and binary attachments to the message.</span></li>
<li><a name="a1262"></a><span class="src-doc">   * Returns an empty string on failure.</span></li>
<li><a name="a1263"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a1264"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1265"></a><span class="src-doc">   */</span></li>
<li><a name="a1266"></a>  <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">AttachAll</span><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1267"></a>    <span class="src-comm">// Return text of body</span></li>
<li><a name="a1268"></a>    <span class="src-var">$mime </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1269"></a>    <span class="src-var">$cidUniq </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1270"></a>    <span class="src-var">$incl </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1271"></a>&nbsp;</li>
<li><a name="a1272"></a>    <span class="src-comm">// Add all attachments</span></li>
<li><a name="a1273"></a>    <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment </span><span class="src-key">as </span><span class="src-var">$attachment</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1274"></a>      <span class="src-comm">// Check for string attachment</span></li>
<li><a name="a1275"></a>      <span class="src-var">$bString </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">5</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1276"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$bString</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1277"></a>        <span class="src-var">$string </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1278"></a>      <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1279"></a>        <span class="src-var">$path </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1280"></a>      <span class="src-sym">}</span></li>
<li><a name="a1281"></a>&nbsp;</li>
<li><a name="a1282"></a>      <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$incl</span><span class="src-sym">)) </span><span class="src-sym">{ </span><span class="src-key">continue</span><span class="src-sym">; </span><span class="src-sym">}</span></li>
<li><a name="a1283"></a>      <span class="src-var">$filename    </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1284"></a>      <span class="src-var">$name        </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1285"></a>      <span class="src-var">$encoding    </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">3</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1286"></a>      <span class="src-var">$type        </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">4</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1287"></a>      <span class="src-var">$disposition </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">6</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1288"></a>      <span class="src-var">$cid         </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">7</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1289"></a>      <span class="src-var">$incl</span><span class="src-sym">[</span><span class="src-sym">]      </span>= <span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1290"></a>      <span class="src-key">if </span><span class="src-sym">( </span>isset<span class="src-sym">(</span><span class="src-var">$cidUniq</span><span class="src-sym">[</span><span class="src-var">$cid</span><span class="src-sym">]</span><span class="src-sym">) ) </span><span class="src-sym">{ </span><span class="src-key">continue</span><span class="src-sym">; </span><span class="src-sym">}</span></li>
<li><a name="a1291"></a>      <span class="src-var">$cidUniq</span><span class="src-sym">[</span><span class="src-var">$cid</span><span class="src-sym">] </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a1292"></a>&nbsp;</li>
<li><a name="a1293"></a>      <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;--%s%s&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1294"></a>      <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Content-Type: %s; name=\&quot;%s\&quot;%s&quot;</span><span class="src-sym">, </span><span class="src-var">$type</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1295"></a>      <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Content-Transfer-Encoding: %s%s&quot;</span><span class="src-sym">, </span><span class="src-var">$encoding</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1296"></a>&nbsp;</li>
<li><a name="a1297"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$disposition </span>== <span class="src-str">'inline'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1298"></a>        <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Content-ID: &lt;%s&gt;%s&quot;</span><span class="src-sym">, </span><span class="src-var">$cid</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1299"></a>      <span class="src-sym">}</span></li>
<li><a name="a1300"></a>&nbsp;</li>
<li><a name="a1301"></a>      <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Content-Disposition: %s; filename=\&quot;%s\&quot;%s&quot;</span><span class="src-sym">, </span><span class="src-var">$disposition</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1302"></a>&nbsp;</li>
<li><a name="a1303"></a>      <span class="src-comm">// Encode as string attachment</span></li>
<li><a name="a1304"></a>      <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$bString</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1305"></a>        <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeString">EncodeString</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-var">$encoding</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1306"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodIsError">IsError</a><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1307"></a>          <span class="src-key">return </span><span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1308"></a>        <span class="src-sym">}</span></li>
<li><a name="a1309"></a>        <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1310"></a>      <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1311"></a>        <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">EncodeFile</span><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">, </span><span class="src-var">$encoding</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1312"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodIsError">IsError</a><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1313"></a>          <span class="src-key">return </span><span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1314"></a>        <span class="src-sym">}</span></li>
<li><a name="a1315"></a>        <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1316"></a>      <span class="src-sym">}</span></li>
<li><a name="a1317"></a>    <span class="src-sym">}</span></li>
<li><a name="a1318"></a>&nbsp;</li>
<li><a name="a1319"></a>    <span class="src-var">$mime</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;--%s--%s&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">boundary</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1320"></a>&nbsp;</li>
<li><a name="a1321"></a>    <span class="src-key">return </span><a href="http://www.php.net/join">join</a><span class="src-sym">(</span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$mime</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1322"></a>  <span class="src-sym">}</span></li>
<li><a name="a1323"></a>&nbsp;</li>
<li><a name="a1324"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1325"></a><span class="src-doc">   * Encodes attachment in requested format.</span></li>
<li><a name="a1326"></a><span class="src-doc">   * Returns an empty string on failure.</span></li>
<li><a name="a1327"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$path </span><span class="src-doc">The full path to the file</span></li>
<li><a name="a1328"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$encoding </span><span class="src-doc">The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'</span></li>
<li><a name="a1329"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@see</span><span class="src-doc"> EncodeFile()</span></li>
<li><a name="a1330"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a1331"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1332"></a><span class="src-doc">   */</span></li>
<li><a name="a1333"></a>  <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">EncodeFile</span><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">, </span><span class="src-var">$encoding </span>= <span class="src-str">'base64'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1334"></a>    try <span class="src-sym">{</span></li>
<li><a name="a1335"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_readable">is_readable</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1336"></a>        throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'file_open'</span><span class="src-sym">) </span>. <span class="src-var">$path</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CONTINUE</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1337"></a>      <span class="src-sym">}</span></li>
<li><a name="a1338"></a>      <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">'get_magic_quotes'</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1339"></a>        <span class="src-key">function </span><span class="src-id">get_magic_quotes</span><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1340"></a>          <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1341"></a>        <span class="src-sym">}</span></li>
<li><a name="a1342"></a>      <span class="src-sym">}</span></li>
<li><a name="a1343"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">PHP_VERSION </span>&lt; <span class="src-num">6</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1344"></a>        <span class="src-var">$magic_quotes </span>= <a href="http://www.php.net/get_magic_quotes_runtime">get_magic_quotes_runtime</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1345"></a>        <a href="http://www.php.net/set_magic_quotes_runtime">set_magic_quotes_runtime</a><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1346"></a>      <span class="src-sym">}</span></li>
<li><a name="a1347"></a>      <span class="src-var">$file_buffer  </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1348"></a>      <span class="src-var">$file_buffer  </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeString">EncodeString</a><span class="src-sym">(</span><span class="src-var">$file_buffer</span><span class="src-sym">, </span><span class="src-var">$encoding</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1349"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">PHP_VERSION </span>&lt; <span class="src-num">6</span><span class="src-sym">) </span><span class="src-sym">{ </span><a href="http://www.php.net/set_magic_quotes_runtime">set_magic_quotes_runtime</a><span class="src-sym">(</span><span class="src-var">$magic_quotes</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-sym">}</span></li>
<li><a name="a1350"></a>      <span class="src-key">return </span><span class="src-var">$file_buffer</span><span class="src-sym">;</span></li>
<li><a name="a1351"></a>    <span class="src-sym">} </span>catch <span class="src-sym">(</span><span class="src-id">Exception </span><span class="src-var">$e</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1352"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetError">SetError</a><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-&gt;</span><span class="src-id">getMessage</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1353"></a>      <span class="src-key">return </span><span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1354"></a>    <span class="src-sym">}</span></li>
<li><a name="a1355"></a>  <span class="src-sym">}</span></li>
<li><a name="a1356"></a>&nbsp;</li>
<li><a name="a1357"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1358"></a><span class="src-doc">   * Encodes string to requested format.</span></li>
<li><a name="a1359"></a><span class="src-doc">   * Returns an empty string on failure.</span></li>
<li><a name="a1360"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$str </span><span class="src-doc">The text to encode</span></li>
<li><a name="a1361"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$encoding </span><span class="src-doc">The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'</span></li>
<li><a name="a1362"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1363"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1364"></a><span class="src-doc">   */</span></li>
<li><a name="a1365"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodEncodeString">EncodeString</a> <span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$encoding </span>= <span class="src-str">'base64'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1366"></a>    <span class="src-var">$encoded </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1367"></a>    <span class="src-key">switch</span><span class="src-sym">(</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$encoding</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1368"></a>      <span class="src-key">case </span><span class="src-str">'base64'</span>:</li>
<li><a name="a1369"></a>        <span class="src-var">$encoded </span>= <a href="http://www.php.net/chunk_split">chunk_split</a><span class="src-sym">(</span><a href="http://www.php.net/base64_encode">base64_encode</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-num">76</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1370"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1371"></a>      <span class="src-key">case </span><span class="src-str">'7bit'</span>:</li>
<li><a name="a1372"></a>      <span class="src-key">case </span><span class="src-str">'8bit'</span>:</li>
<li><a name="a1373"></a>        <span class="src-var">$encoded </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">FixEOL</span><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1374"></a>        <span class="src-comm">//Make sure it ends with a line break</span></li>
<li><a name="a1375"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$encoded</span><span class="src-sym">, </span>-<span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">))) </span>!= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span></li>
<li><a name="a1376"></a>          <span class="src-var">$encoded </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1377"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1378"></a>      <span class="src-key">case </span><span class="src-str">'binary'</span>:</li>
<li><a name="a1379"></a>        <span class="src-var">$encoded </span>= <span class="src-var">$str</span><span class="src-sym">;</span></li>
<li><a name="a1380"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1381"></a>      <span class="src-key">case </span><span class="src-str">'quoted-printable'</span>:</li>
<li><a name="a1382"></a>        <span class="src-var">$encoded </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeQP">EncodeQP</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1383"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1384"></a>      <span class="src-key">default</span>:</li>
<li><a name="a1385"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetError">SetError</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'encoding'</span><span class="src-sym">) </span>. <span class="src-var">$encoding</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1386"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1387"></a>    <span class="src-sym">}</span></li>
<li><a name="a1388"></a>    <span class="src-key">return </span><span class="src-var">$encoded</span><span class="src-sym">;</span></li>
<li><a name="a1389"></a>  <span class="src-sym">}</span></li>
<li><a name="a1390"></a>&nbsp;</li>
<li><a name="a1391"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1392"></a><span class="src-doc">   * Encode a header string to best (shortest) of Q, B, quoted or none.</span></li>
<li><a name="a1393"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1394"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1395"></a><span class="src-doc">   */</span></li>
<li><a name="a1396"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodEncodeHeader">EncodeHeader</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$position </span>= <span class="src-str">'text'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1397"></a>    <span class="src-var">$x </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a1398"></a>&nbsp;</li>
<li><a name="a1399"></a>    <span class="src-key">switch </span><span class="src-sym">(</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$position</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1400"></a>      <span class="src-key">case </span><span class="src-str">'phrase'</span>:</li>
<li><a name="a1401"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'/[\200-\377]/'</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1402"></a>          <span class="src-comm">// Can't use addslashes as we don't know what value has magic_quotes_sybase</span></li>
<li><a name="a1403"></a>          <span class="src-var">$encoded </span>= <a href="http://www.php.net/addcslashes">addcslashes</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-str">&quot;\0..\37\177\\\&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1404"></a>          <span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$str </span>== <span class="src-var">$encoded</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">!</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'/[^A-Za-z0-9!#$%&amp;\'*+\/=?^_`{|}~ -]/'</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1405"></a>            <span class="src-key">return </span><span class="src-sym">(</span><span class="src-var">$encoded</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1406"></a>          <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1407"></a>            <span class="src-key">return </span><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">\&quot;<span class="src-var">$encoded</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1408"></a>          <span class="src-sym">}</span></li>
<li><a name="a1409"></a>        <span class="src-sym">}</span></li>
<li><a name="a1410"></a>        <span class="src-var">$x </span>= <a href="http://www.php.net/preg_match_all">preg_match_all</a><span class="src-sym">(</span><span class="src-str">'/[^\040\041\043-\133\135-\176]/'</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$matches</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1411"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1412"></a>      <span class="src-key">case </span><span class="src-str">'comment'</span>:</li>
<li><a name="a1413"></a>        <span class="src-var">$x </span>= <a href="http://www.php.net/preg_match_all">preg_match_all</a><span class="src-sym">(</span><span class="src-str">'/[()&quot;]/'</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$matches</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1414"></a>        <span class="src-comm">// Fall-through</span></li>
<li><a name="a1415"></a>      <span class="src-key">case </span><span class="src-str">'text'</span>:</li>
<li><a name="a1416"></a>      <span class="src-key">default</span>:</li>
<li><a name="a1417"></a>        <span class="src-var">$x </span>+= <a href="http://www.php.net/preg_match_all">preg_match_all</a><span class="src-sym">(</span><span class="src-str">'/[\000-\010\013\014\016-\037\177-\377]/'</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$matches</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1418"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1419"></a>    <span class="src-sym">}</span></li>
<li><a name="a1420"></a>&nbsp;</li>
<li><a name="a1421"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$x </span>== <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1422"></a>      <span class="src-key">return </span><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1423"></a>    <span class="src-sym">}</span></li>
<li><a name="a1424"></a>&nbsp;</li>
<li><a name="a1425"></a>    <span class="src-var">$maxlen </span>= <span class="src-num">75 </span>- <span class="src-num">7 </span>- <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$CharSet">CharSet</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1426"></a>    <span class="src-comm">// Try to select the encoding which should produce the shortest output</span></li>
<li><a name="a1427"></a>    <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)</span>/<span class="src-num">3 </span>&lt; <span class="src-var">$x</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1428"></a>      <span class="src-var">$encoding </span>= <span class="src-str">'B'</span><span class="src-sym">;</span></li>
<li><a name="a1429"></a>      <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">'mb_strlen'</span><span class="src-sym">) </span>&amp;&amp; <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodHasMultiBytes">HasMultiBytes</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1430"></a>        <span class="src-comm">// Use a custom function which correctly encodes and wraps long</span></li>
<li><a name="a1431"></a>        <span class="src-comm">// multibyte strings without breaking lines within a character</span></li>
<li><a name="a1432"></a>        <span class="src-var">$encoded </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodBase64EncodeWrapMB">Base64EncodeWrapMB</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1433"></a>      <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1434"></a>        <span class="src-var">$encoded </span>= <a href="http://www.php.net/base64_encode">base64_encode</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1435"></a>        <span class="src-var">$maxlen </span>-= <span class="src-var">$maxlen </span>% <span class="src-num">4</span><span class="src-sym">;</span></li>
<li><a name="a1436"></a>        <span class="src-var">$encoded </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><a href="http://www.php.net/chunk_split">chunk_split</a><span class="src-sym">(</span><span class="src-var">$encoded</span><span class="src-sym">, </span><span class="src-var">$maxlen</span><span class="src-sym">, </span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1437"></a>      <span class="src-sym">}</span></li>
<li><a name="a1438"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1439"></a>      <span class="src-var">$encoding </span>= <span class="src-str">'Q'</span><span class="src-sym">;</span></li>
<li><a name="a1440"></a>      <span class="src-var">$encoded </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeQ">EncodeQ</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$position</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1441"></a>      <span class="src-var">$encoded </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodWrapText">WrapText</a><span class="src-sym">(</span><span class="src-var">$encoded</span><span class="src-sym">, </span><span class="src-var">$maxlen</span><span class="src-sym">, </span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1442"></a>      <span class="src-var">$encoded </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">'='</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">, </span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">, </span><a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$encoded</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1443"></a>    <span class="src-sym">}</span></li>
<li><a name="a1444"></a>&nbsp;</li>
<li><a name="a1445"></a>    <span class="src-var">$encoded </span>= <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/^(.*)$/m'</span><span class="src-sym">, </span><span class="src-str">&quot; =?&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$CharSet">CharSet</a>.<span class="src-str">&quot;</span><span class="src-str">?<span class="src-var">$encoding</span>?\\1?=</span><span class="src-str">&quot;</span><span class="src-sym">, </span><span class="src-var">$encoded</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1446"></a>    <span class="src-var">$encoded </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">, </span><span class="src-var">$encoded</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1447"></a>&nbsp;</li>
<li><a name="a1448"></a>    <span class="src-key">return </span><span class="src-var">$encoded</span><span class="src-sym">;</span></li>
<li><a name="a1449"></a>  <span class="src-sym">}</span></li>
<li><a name="a1450"></a>&nbsp;</li>
<li><a name="a1451"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1452"></a><span class="src-doc">   * Checks if a string contains multibyte characters.</span></li>
<li><a name="a1453"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1454"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$str </span><span class="src-doc">multi-byte text to wrap encode</span></li>
<li><a name="a1455"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a1456"></a><span class="src-doc">   */</span></li>
<li><a name="a1457"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodHasMultiBytes">HasMultiBytes</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1458"></a>    <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">'mb_strlen'</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1459"></a>      <span class="src-key">return </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">) </span>&gt; <span class="src-id">mb_strlen</span><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$CharSet">CharSet</a><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1460"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{ </span><span class="src-comm">// Assume no multibytes (we can't handle without mbstring functions anyway)</span></li>
<li><a name="a1461"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1462"></a>    <span class="src-sym">}</span></li>
<li><a name="a1463"></a>  <span class="src-sym">}</span></li>
<li><a name="a1464"></a>&nbsp;</li>
<li><a name="a1465"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1466"></a><span class="src-doc">   * Correctly encodes and wraps long multibyte strings for mail headers</span></li>
<li><a name="a1467"></a><span class="src-doc">   * without breaking lines within a character.</span></li>
<li><a name="a1468"></a><span class="src-doc">   * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php</span></li>
<li><a name="a1469"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1470"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$str </span><span class="src-doc">multi-byte text to wrap encode</span></li>
<li><a name="a1471"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1472"></a><span class="src-doc">   */</span></li>
<li><a name="a1473"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodBase64EncodeWrapMB">Base64EncodeWrapMB</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1474"></a>    <span class="src-var">$start </span>= <span class="src-str">&quot;=?&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$CharSet">CharSet</a>.<span class="src-str">&quot;?B?&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1475"></a>    <span class="src-var">$end </span>= <span class="src-str">&quot;?=&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1476"></a>    <span class="src-var">$encoded </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1477"></a>&nbsp;</li>
<li><a name="a1478"></a>    <span class="src-var">$mb_length </span>= <span class="src-id">mb_strlen</span><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$CharSet">CharSet</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1479"></a>    <span class="src-comm">// Each line must have length &lt;= 75, including $start and $end</span></li>
<li><a name="a1480"></a>    <span class="src-var">$length </span>= <span class="src-num">75 </span>- <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$start</span><span class="src-sym">) </span>- <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$end</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1481"></a>    <span class="src-comm">// Average multi-byte ratio</span></li>
<li><a name="a1482"></a>    <span class="src-var">$ratio </span>= <span class="src-var">$mb_length </span>/ <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1483"></a>    <span class="src-comm">// Base64 has a 4:3 ratio</span></li>
<li><a name="a1484"></a>    <span class="src-var">$offset </span>= <span class="src-var">$avgLength </span>= <a href="http://www.php.net/floor">floor</a><span class="src-sym">(</span><span class="src-var">$length </span>* <span class="src-var">$ratio </span>* <span class="src-num">.75</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1485"></a>&nbsp;</li>
<li><a name="a1486"></a>    <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i </span>= <span class="src-num">0</span><span class="src-sym">; </span><span class="src-var">$i </span>&lt; <span class="src-var">$mb_length</span><span class="src-sym">; </span><span class="src-var">$i </span>+= <span class="src-var">$offset</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1487"></a>      <span class="src-var">$lookBack </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a1488"></a>&nbsp;</li>
<li><a name="a1489"></a>      do <span class="src-sym">{</span></li>
<li><a name="a1490"></a>        <span class="src-var">$offset </span>= <span class="src-var">$avgLength </span>- <span class="src-var">$lookBack</span><span class="src-sym">;</span></li>
<li><a name="a1491"></a>        <span class="src-var">$chunk </span>= <span class="src-id">mb_substr</span><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$i</span><span class="src-sym">, </span><span class="src-var">$offset</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$CharSet">CharSet</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1492"></a>        <span class="src-var">$chunk </span>= <a href="http://www.php.net/base64_encode">base64_encode</a><span class="src-sym">(</span><span class="src-var">$chunk</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1493"></a>        <span class="src-var">$lookBack</span>++<span class="src-sym">;</span></li>
<li><a name="a1494"></a>      <span class="src-sym">}</span></li>
<li><a name="a1495"></a>      <span class="src-key">while </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$chunk</span><span class="src-sym">) </span>&gt; <span class="src-var">$length</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1496"></a>&nbsp;</li>
<li><a name="a1497"></a>      <span class="src-var">$encoded </span>.= <span class="src-var">$chunk </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">;</span></li>
<li><a name="a1498"></a>    <span class="src-sym">}</span></li>
<li><a name="a1499"></a>&nbsp;</li>
<li><a name="a1500"></a>    <span class="src-comm">// Chomp the last linefeed</span></li>
<li><a name="a1501"></a>    <span class="src-var">$encoded </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$encoded</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span>-<a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1502"></a>    <span class="src-key">return </span><span class="src-var">$encoded</span><span class="src-sym">;</span></li>
<li><a name="a1503"></a>  <span class="src-sym">}</span></li>
<li><a name="a1504"></a>&nbsp;</li>
<li><a name="a1505"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1506"></a><span class="src-doc">  * Encode string to quoted-printable.</span></li>
<li><a name="a1507"></a><span class="src-doc">  * Only uses standard PHP, slow, but will always work</span></li>
<li><a name="a1508"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1509"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$string </span><span class="src-doc">the text to encode</span></li>
<li><a name="a1510"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$line_max </span><span class="src-doc">Number of chars allowed on a line before wrapping</span></li>
<li><a name="a1511"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1512"></a><span class="src-doc">  */</span></li>
<li><a name="a1513"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodEncodeQPphp">EncodeQPphp</a><span class="src-sym">( </span><span class="src-var">$input </span>= <span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$line_max </span>= <span class="src-num">76</span><span class="src-sym">, </span><span class="src-var">$space_conv </span>= <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1514"></a>    <span class="src-var">$hex </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'0'</span><span class="src-sym">,</span><span class="src-str">'1'</span><span class="src-sym">,</span><span class="src-str">'2'</span><span class="src-sym">,</span><span class="src-str">'3'</span><span class="src-sym">,</span><span class="src-str">'4'</span><span class="src-sym">,</span><span class="src-str">'5'</span><span class="src-sym">,</span><span class="src-str">'6'</span><span class="src-sym">,</span><span class="src-str">'7'</span><span class="src-sym">,</span><span class="src-str">'8'</span><span class="src-sym">,</span><span class="src-str">'9'</span><span class="src-sym">,</span><span class="src-str">'A'</span><span class="src-sym">,</span><span class="src-str">'B'</span><span class="src-sym">,</span><span class="src-str">'C'</span><span class="src-sym">,</span><span class="src-str">'D'</span><span class="src-sym">,</span><span class="src-str">'E'</span><span class="src-sym">,</span><span class="src-str">'F'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1515"></a>    <span class="src-var">$lines </span>= <a href="http://www.php.net/preg_split">preg_split</a><span class="src-sym">(</span><span class="src-str">'/(?:\r\n|\r|\n)/'</span><span class="src-sym">, </span><span class="src-var">$input</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1516"></a>    <span class="src-var">$eol </span>= <span class="src-str">&quot;\r\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1517"></a>    <span class="src-var">$escape </span>= <span class="src-str">'='</span><span class="src-sym">;</span></li>
<li><a name="a1518"></a>    <span class="src-var">$output </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1519"></a>    <span class="src-key">while</span><span class="src-sym">( </span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$line</span><span class="src-sym">) </span>= <a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$lines</span><span class="src-sym">) ) </span><span class="src-sym">{</span></li>
<li><a name="a1520"></a>      <span class="src-var">$linlen </span>= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1521"></a>      <span class="src-var">$newline </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1522"></a>      <span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$i </span>= <span class="src-num">0</span><span class="src-sym">; </span><span class="src-var">$i </span>&lt; <span class="src-var">$linlen</span><span class="src-sym">; </span><span class="src-var">$i</span>++<span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1523"></a>        <span class="src-var">$c </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">( </span><span class="src-var">$line</span><span class="src-sym">, </span><span class="src-var">$i</span><span class="src-sym">, </span><span class="src-num">1 </span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1524"></a>        <span class="src-var">$dec </span>= <a href="http://www.php.net/ord">ord</a><span class="src-sym">( </span><span class="src-var">$c </span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1525"></a>        <span class="src-key">if </span><span class="src-sym">( ( </span><span class="src-var">$i </span>== <span class="src-num">0 </span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">( </span><span class="src-var">$dec </span>== <span class="src-num">46 </span><span class="src-sym">) ) </span><span class="src-sym">{ </span><span class="src-comm">// convert first point in the line into =2E</span></li>
<li><a name="a1526"></a>          <span class="src-var">$c </span>= <span class="src-str">'=2E'</span><span class="src-sym">;</span></li>
<li><a name="a1527"></a>        <span class="src-sym">}</span></li>
<li><a name="a1528"></a>        <span class="src-key">if </span><span class="src-sym">( </span><span class="src-var">$dec </span>== <span class="src-num">32 </span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1529"></a>          <span class="src-key">if </span><span class="src-sym">( </span><span class="src-var">$i </span>== <span class="src-sym">( </span><span class="src-var">$linlen </span>- <span class="src-num">1 </span><span class="src-sym">) ) </span><span class="src-sym">{ </span><span class="src-comm">// convert space at eol only</span></li>
<li><a name="a1530"></a>            <span class="src-var">$c </span>= <span class="src-str">'=20'</span><span class="src-sym">;</span></li>
<li><a name="a1531"></a>          <span class="src-sym">} </span><span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">( </span><span class="src-var">$space_conv </span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1532"></a>            <span class="src-var">$c </span>= <span class="src-str">'=20'</span><span class="src-sym">;</span></li>
<li><a name="a1533"></a>          <span class="src-sym">}</span></li>
<li><a name="a1534"></a>        <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">( (</span><span class="src-var">$dec </span>== <span class="src-num">61</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><span class="src-var">$dec </span>&lt; <span class="src-num">32 </span><span class="src-sym">) </span>|| <span class="src-sym">(</span><span class="src-var">$dec </span>&gt; <span class="src-num">126</span><span class="src-sym">) ) </span><span class="src-sym">{ </span><span class="src-comm">// always encode &quot;\t&quot;, which is *not* required</span></li>
<li><a name="a1535"></a>          <span class="src-var">$h2 </span>= <a href="http://www.php.net/floor">floor</a><span class="src-sym">(</span><span class="src-var">$dec</span>/<span class="src-num">16</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1536"></a>          <span class="src-var">$h1 </span>= <a href="http://www.php.net/floor">floor</a><span class="src-sym">(</span><span class="src-var">$dec</span>%<span class="src-num">16</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1537"></a>          <span class="src-var">$c </span>= <span class="src-var">$escape</span>.<span class="src-var">$hex</span><span class="src-sym">[</span><span class="src-var">$h2</span><span class="src-sym">]</span>.<span class="src-var">$hex</span><span class="src-sym">[</span><span class="src-var">$h1</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1538"></a>        <span class="src-sym">}</span></li>
<li><a name="a1539"></a>        <span class="src-key">if </span><span class="src-sym">( (</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$newline</span><span class="src-sym">) </span>+ <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$c</span><span class="src-sym">)) </span>&gt;= <span class="src-var">$line_max </span><span class="src-sym">) </span><span class="src-sym">{ </span><span class="src-comm">// CRLF is not counted</span></li>
<li><a name="a1540"></a>          <span class="src-var">$output </span>.= <span class="src-var">$newline</span>.<span class="src-var">$escape</span>.<span class="src-var">$eol</span><span class="src-sym">; </span><span class="src-comm">//  soft line break; &quot; =\r\n&quot; is okay</span></li>
<li><a name="a1541"></a>          <span class="src-var">$newline </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1542"></a>          <span class="src-comm">// check if newline first character will be point or not</span></li>
<li><a name="a1543"></a>          <span class="src-key">if </span><span class="src-sym">( </span><span class="src-var">$dec </span>== <span class="src-num">46 </span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1544"></a>            <span class="src-var">$c </span>= <span class="src-str">'=2E'</span><span class="src-sym">;</span></li>
<li><a name="a1545"></a>          <span class="src-sym">}</span></li>
<li><a name="a1546"></a>        <span class="src-sym">}</span></li>
<li><a name="a1547"></a>        <span class="src-var">$newline </span>.= <span class="src-var">$c</span><span class="src-sym">;</span></li>
<li><a name="a1548"></a>      <span class="src-sym">} </span><span class="src-comm">// end of for</span></li>
<li><a name="a1549"></a>      <span class="src-var">$output </span>.= <span class="src-var">$newline</span>.<span class="src-var">$eol</span><span class="src-sym">;</span></li>
<li><a name="a1550"></a>    <span class="src-sym">} </span><span class="src-comm">// end of while</span></li>
<li><a name="a1551"></a>    <span class="src-key">return </span><span class="src-var">$output</span><span class="src-sym">;</span></li>
<li><a name="a1552"></a>  <span class="src-sym">}</span></li>
<li><a name="a1553"></a>&nbsp;</li>
<li><a name="a1554"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1555"></a><span class="src-doc">  * Encode string to RFC2045 (6.7) quoted-printable format</span></li>
<li><a name="a1556"></a><span class="src-doc">  * Uses a PHP5 stream filter to do the encoding about 64x faster than the old version</span></li>
<li><a name="a1557"></a><span class="src-doc">  * Also results in same content as you started with after decoding</span></li>
<li><a name="a1558"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@see</span><span class="src-doc"> EncodeQPphp()</span></li>
<li><a name="a1559"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1560"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$string </span><span class="src-doc">the text to encode</span></li>
<li><a name="a1561"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$line_max </span><span class="src-doc">Number of chars allowed on a line before wrapping</span></li>
<li><a name="a1562"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$space_conv </span><span class="src-doc">Dummy param for compatibility with existing EncodeQP function</span></li>
<li><a name="a1563"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1564"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Marcus Bointon</span></li>
<li><a name="a1565"></a><span class="src-doc">  */</span></li>
<li><a name="a1566"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodEncodeQP">EncodeQP</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-var">$line_max </span>= <span class="src-num">76</span><span class="src-sym">, </span><span class="src-var">$space_conv </span>= <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1567"></a>    <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">'quoted_printable_encode'</span><span class="src-sym">)) </span><span class="src-sym">{ </span><span class="src-comm">//Use native function if it's available (&gt;= PHP5.3)</span></li>
<li><a name="a1568"></a>      <span class="src-key">return </span><span class="src-id">quoted_printable_encode</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1569"></a>    <span class="src-sym">}</span></li>
<li><a name="a1570"></a>    <span class="src-var">$filters </span>= <a href="http://www.php.net/stream_get_filters">stream_get_filters</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1571"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-str">'convert.*'</span><span class="src-sym">, </span><span class="src-var">$filters</span><span class="src-sym">)) </span><span class="src-sym">{ </span><span class="src-comm">//Got convert stream filter?</span></li>
<li><a name="a1572"></a>      <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodEncodeQPphp">EncodeQPphp</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-var">$line_max</span><span class="src-sym">, </span><span class="src-var">$space_conv</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//Fall back to old implementation</span></li>
<li><a name="a1573"></a>    <span class="src-sym">}</span></li>
<li><a name="a1574"></a>    <span class="src-var">$fp </span>= <a href="http://www.php.net/fopen">fopen</a><span class="src-sym">(</span><span class="src-str">'php://temp/'</span><span class="src-sym">, </span><span class="src-str">'r+'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1575"></a>    <span class="src-var">$string </span>= <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/\r\n?/'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">, </span><span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//Normalise line breaks</span></li>
<li><a name="a1576"></a>    <span class="src-var">$params </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'line-length' </span>=&gt; <span class="src-var">$line_max</span><span class="src-sym">, </span><span class="src-str">'line-break-chars' </span>=&gt; <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1577"></a>    <span class="src-var">$s </span>= <a href="http://www.php.net/stream_filter_append">stream_filter_append</a><span class="src-sym">(</span><span class="src-var">$fp</span><span class="src-sym">, </span><span class="src-str">'convert.quoted-printable-encode'</span><span class="src-sym">, </span><span class="src-id">STREAM_FILTER_READ</span><span class="src-sym">, </span><span class="src-var">$params</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1578"></a>    <a href="http://www.php.net/fputs">fputs</a><span class="src-sym">(</span><span class="src-var">$fp</span><span class="src-sym">, </span><span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1579"></a>    <a href="http://www.php.net/rewind">rewind</a><span class="src-sym">(</span><span class="src-var">$fp</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1580"></a>    <span class="src-var">$out </span>= <a href="http://www.php.net/stream_get_contents">stream_get_contents</a><span class="src-sym">(</span><span class="src-var">$fp</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1581"></a>    <a href="http://www.php.net/stream_filter_remove">stream_filter_remove</a><span class="src-sym">(</span><span class="src-var">$s</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1582"></a>    <span class="src-var">$out </span>= <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/^\./m'</span><span class="src-sym">, </span><span class="src-str">'=2E'</span><span class="src-sym">, </span><span class="src-var">$out</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//Encode . if it is first char on a line, workaround for bug in Exchange</span></li>
<li><a name="a1583"></a>    <a href="http://www.php.net/fclose">fclose</a><span class="src-sym">(</span><span class="src-var">$fp</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1584"></a>    <span class="src-key">return </span><span class="src-var">$out</span><span class="src-sym">;</span></li>
<li><a name="a1585"></a>  <span class="src-sym">}</span></li>
<li><a name="a1586"></a>&nbsp;</li>
<li><a name="a1587"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1588"></a><span class="src-doc">   * Encode string to q encoding.</span></li>
<li><a name="a1589"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@link</span><span class="src-doc"> http://tools.ietf.org/html/rfc2047</span></li>
<li><a name="a1590"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$str </span><span class="src-doc">the text to encode</span></li>
<li><a name="a1591"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$position </span><span class="src-doc">Where the text is going to be used, see the RFC for what that means</span></li>
<li><a name="a1592"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1593"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1594"></a><span class="src-doc">   */</span></li>
<li><a name="a1595"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodEncodeQ">EncodeQ</a> <span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">, </span><span class="src-var">$position </span>= <span class="src-str">'text'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1596"></a>    <span class="src-comm">// There should not be any EOL in the string</span></li>
<li><a name="a1597"></a>    <span class="src-var">$encoded </span>= <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/[\r\n]*/'</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1598"></a>&nbsp;</li>
<li><a name="a1599"></a>    <span class="src-key">switch </span><span class="src-sym">(</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$position</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1600"></a>      <span class="src-key">case </span><span class="src-str">'phrase'</span>:</li>
<li><a name="a1601"></a>        <span class="src-var">$encoded </span>= <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">&quot;/([^A-Za-z0-9!*+\/ -])/e&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;'='.sprintf('%02X', ord('\\1'))&quot;</span><span class="src-sym">, </span><span class="src-var">$encoded</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1602"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1603"></a>      <span class="src-key">case </span><span class="src-str">'comment'</span>:</li>
<li><a name="a1604"></a>        <span class="src-var">$encoded </span>= <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">&quot;/([\(\)\&quot;])/e&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;'='.sprintf('%02X', ord('\\1'))&quot;</span><span class="src-sym">, </span><span class="src-var">$encoded</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1605"></a>      <span class="src-key">case </span><span class="src-str">'text'</span>:</li>
<li><a name="a1606"></a>      <span class="src-key">default</span>:</li>
<li><a name="a1607"></a>        <span class="src-comm">// Replace every high ascii, control =, ? and _ characters</span></li>
<li><a name="a1608"></a>        <span class="src-comm">//TODO using /e (equivalent to eval()) is probably not a good idea</span></li>
<li><a name="a1609"></a>        <span class="src-var">$encoded </span>= <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e'</span><span class="src-sym">,</span></li>
<li><a name="a1610"></a>              <span class="src-str">&quot;'='.sprintf('%02X', ord('\\1'))&quot;</span><span class="src-sym">, </span><span class="src-var">$encoded</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1611"></a>        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1612"></a>    <span class="src-sym">}</span></li>
<li><a name="a1613"></a>&nbsp;</li>
<li><a name="a1614"></a>    <span class="src-comm">// Replace every spaces to _ (more readable than =20)</span></li>
<li><a name="a1615"></a>    <span class="src-var">$encoded </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">, </span><span class="src-str">'_'</span><span class="src-sym">, </span><span class="src-var">$encoded</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1616"></a>&nbsp;</li>
<li><a name="a1617"></a>    <span class="src-key">return </span><span class="src-var">$encoded</span><span class="src-sym">;</span></li>
<li><a name="a1618"></a>  <span class="src-sym">}</span></li>
<li><a name="a1619"></a>&nbsp;</li>
<li><a name="a1620"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1621"></a><span class="src-doc">   * Adds a string or binary attachment (non-filesystem) to the list.</span></li>
<li><a name="a1622"></a><span class="src-doc">   * This method can be used to attach ascii or binary data,</span></li>
<li><a name="a1623"></a><span class="src-doc">   * such as a BLOB record from a database.</span></li>
<li><a name="a1624"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$string </span><span class="src-doc">String attachment data.</span></li>
<li><a name="a1625"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$filename </span><span class="src-doc">Name of the attachment.</span></li>
<li><a name="a1626"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$encoding </span><span class="src-doc">File encoding (see $Encoding).</span></li>
<li><a name="a1627"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$type </span><span class="src-doc">File extension (MIME) type.</span></li>
<li><a name="a1628"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1629"></a><span class="src-doc">   */</span></li>
<li><a name="a1630"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddStringAttachment">AddStringAttachment</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-var">$filename</span><span class="src-sym">, </span><span class="src-var">$encoding </span>= <span class="src-str">'base64'</span><span class="src-sym">, </span><span class="src-var">$type </span>= <span class="src-str">'application/octet-stream'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1631"></a>    <span class="src-comm">// Append to $attachment array</span></li>
<li><a name="a1632"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a1633"></a>      <span class="src-num">0 </span>=&gt; <span class="src-var">$string</span><span class="src-sym">,</span></li>
<li><a name="a1634"></a>      <span class="src-num">1 </span>=&gt; <span class="src-var">$filename</span><span class="src-sym">,</span></li>
<li><a name="a1635"></a>      <span class="src-num">2 </span>=&gt; <span class="src-var">$filename</span><span class="src-sym">,</span></li>
<li><a name="a1636"></a>      <span class="src-num">3 </span>=&gt; <span class="src-var">$encoding</span><span class="src-sym">,</span></li>
<li><a name="a1637"></a>      <span class="src-num">4 </span>=&gt; <span class="src-var">$type</span><span class="src-sym">,</span></li>
<li><a name="a1638"></a>      <span class="src-num">5 </span>=&gt; <span class="src-id">true</span><span class="src-sym">,  </span><span class="src-comm">// isStringAttachment</span></li>
<li><a name="a1639"></a>      <span class="src-num">6 </span>=&gt; <span class="src-str">'attachment'</span><span class="src-sym">,</span></li>
<li><a name="a1640"></a>      <span class="src-num">7 </span>=&gt; <span class="src-num">0</span></li>
<li><a name="a1641"></a>    <span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1642"></a>  <span class="src-sym">}</span></li>
<li><a name="a1643"></a>&nbsp;</li>
<li><a name="a1644"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1645"></a><span class="src-doc">   * Adds an embedded attachment.  This can include images, sounds, and</span></li>
<li><a name="a1646"></a><span class="src-doc">   * just about any other document.  Make sure to set the $type to an</span></li>
<li><a name="a1647"></a><span class="src-doc">   * image type.  For JPEG images use &quot;image/jpeg&quot; and for GIF images</span></li>
<li><a name="a1648"></a><span class="src-doc">   * use &quot;image/gif&quot;.</span></li>
<li><a name="a1649"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$path </span><span class="src-doc">Path to the attachment.</span></li>
<li><a name="a1650"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$cid </span><span class="src-doc">Content ID of the attachment.  Use this to identify</span></li>
<li><a name="a1651"></a><span class="src-doc">   *         the Id for accessing the image in an HTML form.</span></li>
<li><a name="a1652"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$name </span><span class="src-doc">Overrides the attachment name.</span></li>
<li><a name="a1653"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$encoding </span><span class="src-doc">File encoding (see $Encoding).</span></li>
<li><a name="a1654"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$type </span><span class="src-doc">File extension (MIME) type.</span></li>
<li><a name="a1655"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a1656"></a><span class="src-doc">   */</span></li>
<li><a name="a1657"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddEmbeddedImage">AddEmbeddedImage</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">, </span><span class="src-var">$cid</span><span class="src-sym">, </span><span class="src-var">$name </span>= <span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$encoding </span>= <span class="src-str">'base64'</span><span class="src-sym">, </span><span class="src-var">$type </span>= <span class="src-str">'application/octet-stream'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1658"></a>&nbsp;</li>
<li><a name="a1659"></a>    <span class="src-key">if </span><span class="src-sym">( </span><span class="src-sym">!</span><span class="src-sym">@</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">) ) </span><span class="src-sym">{</span></li>
<li><a name="a1660"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetError">SetError</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'file_access'</span><span class="src-sym">) </span>. <span class="src-var">$path</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1661"></a>      <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1662"></a>    <span class="src-sym">}</span></li>
<li><a name="a1663"></a>&nbsp;</li>
<li><a name="a1664"></a>    <span class="src-var">$filename </span>= <a href="http://www.php.net/basename">basename</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1665"></a>    <span class="src-key">if </span><span class="src-sym">( </span><span class="src-var">$name </span>== <span class="src-str">'' </span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1666"></a>      <span class="src-var">$name </span>= <span class="src-var">$filename</span><span class="src-sym">;</span></li>
<li><a name="a1667"></a>    <span class="src-sym">}</span></li>
<li><a name="a1668"></a>&nbsp;</li>
<li><a name="a1669"></a>    <span class="src-comm">// Append to $attachment array</span></li>
<li><a name="a1670"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a1671"></a>      <span class="src-num">0 </span>=&gt; <span class="src-var">$path</span><span class="src-sym">,</span></li>
<li><a name="a1672"></a>      <span class="src-num">1 </span>=&gt; <span class="src-var">$filename</span><span class="src-sym">,</span></li>
<li><a name="a1673"></a>      <span class="src-num">2 </span>=&gt; <span class="src-var">$name</span><span class="src-sym">,</span></li>
<li><a name="a1674"></a>      <span class="src-num">3 </span>=&gt; <span class="src-var">$encoding</span><span class="src-sym">,</span></li>
<li><a name="a1675"></a>      <span class="src-num">4 </span>=&gt; <span class="src-var">$type</span><span class="src-sym">,</span></li>
<li><a name="a1676"></a>      <span class="src-num">5 </span>=&gt; <span class="src-id">false</span><span class="src-sym">,  </span><span class="src-comm">// isStringAttachment</span></li>
<li><a name="a1677"></a>      <span class="src-num">6 </span>=&gt; <span class="src-str">'inline'</span><span class="src-sym">,</span></li>
<li><a name="a1678"></a>      <span class="src-num">7 </span>=&gt; <span class="src-var">$cid</span></li>
<li><a name="a1679"></a>    <span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1680"></a>&nbsp;</li>
<li><a name="a1681"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a1682"></a>  <span class="src-sym">}</span></li>
<li><a name="a1683"></a>&nbsp;</li>
<li><a name="a1684"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1685"></a><span class="src-doc">   * Returns true if an inline attachment is present.</span></li>
<li><a name="a1686"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1687"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a1688"></a><span class="src-doc">   */</span></li>
<li><a name="a1689"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodInlineImageExists">InlineImageExists</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1690"></a>    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment </span><span class="src-key">as </span><span class="src-var">$attachment</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1691"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$attachment</span><span class="src-sym">[</span><span class="src-num">6</span><span class="src-sym">] </span>== <span class="src-str">'inline'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1692"></a>        <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a1693"></a>      <span class="src-sym">}</span></li>
<li><a name="a1694"></a>    <span class="src-sym">}</span></li>
<li><a name="a1695"></a>    <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1696"></a>  <span class="src-sym">}</span></li>
<li><a name="a1697"></a>&nbsp;</li>
<li><a name="a1698"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a1699"></a>  <span class="src-comm">// CLASS METHODS, MESSAGE RESET</span></li>
<li><a name="a1700"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a1701"></a>&nbsp;</li>
<li><a name="a1700"></a>  </li>
<li><a name="a1701"></a>&nbsp;</li>
<li><a name="a1702"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1703"></a><span class="src-doc">   * Clears all recipients assigned in the TO array.  Returns void.</span></li>
<li><a name="a1704"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1705"></a><span class="src-doc">   */</span></li>
<li><a name="a1706"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodClearAddresses">ClearAddresses</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1707"></a>    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">to </span><span class="src-key">as </span><span class="src-var">$to</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1708"></a>      unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">all_recipients</span><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$to</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1709"></a>    <span class="src-sym">}</span></li>
<li><a name="a1710"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">to </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1711"></a>  <span class="src-sym">}</span></li>
<li><a name="a1712"></a>&nbsp;</li>
<li><a name="a1713"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1714"></a><span class="src-doc">   * Clears all recipients assigned in the CC array.  Returns void.</span></li>
<li><a name="a1715"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1716"></a><span class="src-doc">   */</span></li>
<li><a name="a1717"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodClearCCs">ClearCCs</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1718"></a>    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">cc </span><span class="src-key">as </span><span class="src-var">$cc</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1719"></a>      unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">all_recipients</span><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$cc</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1720"></a>    <span class="src-sym">}</span></li>
<li><a name="a1721"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">cc </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1722"></a>  <span class="src-sym">}</span></li>
<li><a name="a1723"></a>&nbsp;</li>
<li><a name="a1724"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1725"></a><span class="src-doc">   * Clears all recipients assigned in the BCC array.  Returns void.</span></li>
<li><a name="a1726"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1727"></a><span class="src-doc">   */</span></li>
<li><a name="a1728"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodClearBCCs">ClearBCCs</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1729"></a>    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">bcc </span><span class="src-key">as </span><span class="src-var">$bcc</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1730"></a>      unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">all_recipients</span><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$bcc</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1731"></a>    <span class="src-sym">}</span></li>
<li><a name="a1732"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">bcc </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1733"></a>  <span class="src-sym">}</span></li>
<li><a name="a1734"></a>&nbsp;</li>
<li><a name="a1735"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1736"></a><span class="src-doc">   * Clears all recipients assigned in the ReplyTo array.  Returns void.</span></li>
<li><a name="a1737"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1738"></a><span class="src-doc">   */</span></li>
<li><a name="a1739"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodClearReplyTos">ClearReplyTos</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1740"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">ReplyTo </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1741"></a>  <span class="src-sym">}</span></li>
<li><a name="a1742"></a>&nbsp;</li>
<li><a name="a1743"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1744"></a><span class="src-doc">   * Clears all recipients assigned in the TO, CC and BCC</span></li>
<li><a name="a1745"></a><span class="src-doc">   * array.  Returns void.</span></li>
<li><a name="a1746"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1747"></a><span class="src-doc">   */</span></li>
<li><a name="a1748"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodClearAllRecipients">ClearAllRecipients</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1749"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">to </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1750"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">cc </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1751"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">bcc </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1752"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">all_recipients </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1753"></a>  <span class="src-sym">}</span></li>
<li><a name="a1754"></a>&nbsp;</li>
<li><a name="a1755"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1756"></a><span class="src-doc">   * Clears all previously set filesystem, string, and binary</span></li>
<li><a name="a1757"></a><span class="src-doc">   * attachments.  Returns void.</span></li>
<li><a name="a1758"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1759"></a><span class="src-doc">   */</span></li>
<li><a name="a1760"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodClearAttachments">ClearAttachments</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1761"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">attachment </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1762"></a>  <span class="src-sym">}</span></li>
<li><a name="a1763"></a>&nbsp;</li>
<li><a name="a1764"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1765"></a><span class="src-doc">   * Clears all custom headers.  Returns void.</span></li>
<li><a name="a1766"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1767"></a><span class="src-doc">   */</span></li>
<li><a name="a1768"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodClearCustomHeaders">ClearCustomHeaders</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1769"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">CustomHeader </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1770"></a>  <span class="src-sym">}</span></li>
<li><a name="a1771"></a>&nbsp;</li>
<li><a name="a1772"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a1773"></a>  <span class="src-comm">// CLASS METHODS, MISCELLANEOUS</span></li>
<li><a name="a1774"></a>  <span class="src-comm">/////////////////////////////////////////////////</span></li>
<li><a name="a1775"></a>&nbsp;</li>
<li><a name="a1774"></a>  </li>
<li><a name="a1775"></a>&nbsp;</li>
<li><a name="a1776"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1777"></a><span class="src-doc">   * Adds the error message to the error container.</span></li>
<li><a name="a1778"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> protected</span></li>
<li><a name="a1779"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1780"></a><span class="src-doc">   */</span></li>
<li><a name="a1781"></a>  <span class="src-key">protected </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSetError">SetError</a><span class="src-sym">(</span><span class="src-var">$msg</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1782"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error_count</span>++<span class="src-sym">;</span></li>
<li><a name="a1783"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Mailer">Mailer</a> == <span class="src-str">'smtp' </span><span class="src-key">and </span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1784"></a>      <span class="src-var">$lasterror </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">smtp</span><span class="src-sym">-&gt;</span><span class="src-id">getError</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1785"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$lasterror</span><span class="src-sym">) </span><span class="src-key">and </span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">'smtp_msg'</span><span class="src-sym">, </span><span class="src-var">$lasterror</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1786"></a>        <span class="src-var">$msg </span>.= <span class="src-str">'&lt;p&gt;' </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'smtp_error'</span><span class="src-sym">) </span>. <span class="src-var">$lasterror</span><span class="src-sym">[</span><span class="src-str">'smtp_msg'</span><span class="src-sym">] </span>. <span class="src-str">&quot;&lt;/p&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1787"></a>      <span class="src-sym">}</span></li>
<li><a name="a1788"></a>    <span class="src-sym">}</span></li>
<li><a name="a1789"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$ErrorInfo">ErrorInfo</a> = <span class="src-var">$msg</span><span class="src-sym">;</span></li>
<li><a name="a1790"></a>  <span class="src-sym">}</span></li>
<li><a name="a1791"></a>&nbsp;</li>
<li><a name="a1792"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1793"></a><span class="src-doc">   * Returns the proper RFC 822 formatted date.</span></li>
<li><a name="a1794"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1795"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1796"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@static</span></li>
<li><a name="a1797"></a><span class="src-doc">   */</span></li>
<li><a name="a1798"></a>  <span class="src-key">public </span><span class="src-key">static </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodRFCDate">RFCDate</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1799"></a>    <span class="src-var">$tz </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">'Z'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1800"></a>    <span class="src-var">$tzs </span>= <span class="src-sym">(</span><span class="src-var">$tz </span>&lt; <span class="src-num">0</span><span class="src-sym">) </span>? <span class="src-str">'-' </span>: <span class="src-str">'+'</span><span class="src-sym">;</span></li>
<li><a name="a1801"></a>    <span class="src-var">$tz </span>= <a href="http://www.php.net/abs">abs</a><span class="src-sym">(</span><span class="src-var">$tz</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1802"></a>    <span class="src-var">$tz </span>= (int)<span class="src-sym">(</span><span class="src-var">$tz</span>/<span class="src-num">3600</span><span class="src-sym">)</span>*<span class="src-num">100 </span>+ <span class="src-sym">(</span><span class="src-var">$tz</span>%<span class="src-num">3600</span><span class="src-sym">)</span>/<span class="src-num">60</span><span class="src-sym">;</span></li>
<li><a name="a1803"></a>    <span class="src-var">$result </span>= <a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;%s %s%04d&quot;</span><span class="src-sym">, </span><a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">'D, j M Y H:i:s'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$tzs</span><span class="src-sym">, </span><span class="src-var">$tz</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1804"></a>&nbsp;</li>
<li><a name="a1805"></a>    <span class="src-key">return </span><span class="src-var">$result</span><span class="src-sym">;</span></li>
<li><a name="a1806"></a>  <span class="src-sym">}</span></li>
<li><a name="a1807"></a>&nbsp;</li>
<li><a name="a1808"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1809"></a><span class="src-doc">   * Returns the server hostname or 'localhost.localdomain' if unknown.</span></li>
<li><a name="a1810"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a1811"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1812"></a><span class="src-doc">   */</span></li>
<li><a name="a1813"></a>  <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">ServerHostname</span><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1814"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Hostname">Hostname</a><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1815"></a>      <span class="src-var">$result </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Hostname">Hostname</a><span class="src-sym">;</span></li>
<li><a name="a1816"></a>    <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'SERVER_NAME'</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1817"></a>      <span class="src-var">$result </span>= <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'SERVER_NAME'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1818"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1819"></a>      <span class="src-var">$result </span>= <span class="src-str">'localhost.localdomain'</span><span class="src-sym">;</span></li>
<li><a name="a1820"></a>    <span class="src-sym">}</span></li>
<li><a name="a1821"></a>&nbsp;</li>
<li><a name="a1822"></a>    <span class="src-key">return </span><span class="src-var">$result</span><span class="src-sym">;</span></li>
<li><a name="a1823"></a>  <span class="src-sym">}</span></li>
<li><a name="a1824"></a>&nbsp;</li>
<li><a name="a1825"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1826"></a><span class="src-doc">   * Returns a message in the appropriate language.</span></li>
<li><a name="a1827"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a1828"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1829"></a><span class="src-doc">   */</span></li>
<li><a name="a1830"></a>  <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1831"></a>    <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$language">language</a><span class="src-sym">) </span>&lt; <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1832"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetLanguage">SetLanguage</a><span class="src-sym">(</span><span class="src-str">'en'</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">// set the default language</span></li>
<li><a name="a1833"></a>    <span class="src-sym">}</span></li>
<li><a name="a1834"></a>&nbsp;</li>
<li><a name="a1835"></a>    <span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$language">language</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1836"></a>      <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$language">language</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1837"></a>    <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a1838"></a>      <span class="src-key">return </span><span class="src-str">'Language string failed to load: ' </span>. <span class="src-var">$key</span><span class="src-sym">;</span></li>
<li><a name="a1839"></a>    <span class="src-sym">}</span></li>
<li><a name="a1840"></a>  <span class="src-sym">}</span></li>
<li><a name="a1841"></a>&nbsp;</li>
<li><a name="a1842"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1843"></a><span class="src-doc">   * Returns true if an error occurred.</span></li>
<li><a name="a1844"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1845"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a1846"></a><span class="src-doc">   */</span></li>
<li><a name="a1847"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodIsError">IsError</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1848"></a>    <span class="src-key">return </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">error_count </span>&gt; <span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1849"></a>  <span class="src-sym">}</span></li>
<li><a name="a1850"></a>&nbsp;</li>
<li><a name="a1851"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1852"></a><span class="src-doc">   * Changes every end of line from CR or LF to CRLF.</span></li>
<li><a name="a1853"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a1854"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a1855"></a><span class="src-doc">   */</span></li>
<li><a name="a1856"></a>  <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">FixEOL</span><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1857"></a>    <span class="src-var">$str </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\r\n&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1858"></a>    <span class="src-var">$str </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\r&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1859"></a>    <span class="src-var">$str </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$LE">LE</a><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1860"></a>    <span class="src-key">return </span><span class="src-var">$str</span><span class="src-sym">;</span></li>
<li><a name="a1861"></a>  <span class="src-sym">}</span></li>
<li><a name="a1862"></a>&nbsp;</li>
<li><a name="a1863"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1864"></a><span class="src-doc">   * Adds a custom header.</span></li>
<li><a name="a1865"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1866"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></li>
<li><a name="a1867"></a><span class="src-doc">   */</span></li>
<li><a name="a1868"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodAddCustomHeader">AddCustomHeader</a><span class="src-sym">(</span><span class="src-var">$custom_header</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1869"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">CustomHeader</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">':'</span><span class="src-sym">, </span><span class="src-var">$custom_header</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1870"></a>  <span class="src-sym">}</span></li>
<li><a name="a1871"></a>&nbsp;</li>
<li><a name="a1872"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1873"></a><span class="src-doc">   * Evaluates the message and returns modifications for inline images and backgrounds</span></li>
<li><a name="a1874"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1875"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">$message </span></li>
<li><a name="a1876"></a><span class="src-doc">   */</span></li>
<li><a name="a1877"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodMsgHTML">MsgHTML</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">, </span><span class="src-var">$basedir </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1878"></a>    <a href="http://www.php.net/preg_match_all">preg_match_all</a><span class="src-sym">(</span><span class="src-str">&quot;/(src|background)=\&quot;(.*)\&quot;/Ui&quot;</span><span class="src-sym">, </span><span class="src-var">$message</span><span class="src-sym">, </span><span class="src-var">$images</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1879"></a>    <span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$images</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1880"></a>      <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$images</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">] </span><span class="src-key">as </span><span class="src-var">$i </span>=&gt; <span class="src-var">$url</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1881"></a>        <span class="src-comm">// do not change urls for absolute images (thanks to corvuscorax)</span></li>
<li><a name="a1882"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'#^[A-z]+://#'</span><span class="src-sym">,</span><span class="src-var">$url</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1883"></a>          <span class="src-var">$filename </span>= <a href="http://www.php.net/basename">basename</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1884"></a>          <span class="src-var">$directory </span>= <a href="http://www.php.net/dirname">dirname</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1885"></a>          <span class="src-sym">(</span><span class="src-var">$directory </span>== <span class="src-str">'.'</span><span class="src-sym">)</span>?<span class="src-var">$directory</span>=<span class="src-str">''</span>:<span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a1886"></a>          <span class="src-var">$cid </span>= <span class="src-str">'cid:' </span>. <a href="http://www.php.net/md5">md5</a><span class="src-sym">(</span><span class="src-var">$filename</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1887"></a>          <span class="src-var">$ext </span>= <a href="http://www.php.net/pathinfo">pathinfo</a><span class="src-sym">(</span><span class="src-var">$filename</span><span class="src-sym">, </span><span class="src-id">PATHINFO_EXTENSION</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1888"></a>          <span class="src-var">$mimeType  </span>= <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">_mime_types</span><span class="src-sym">(</span><span class="src-var">$ext</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1889"></a>          <span class="src-key">if </span><span class="src-sym">( </span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$basedir</span><span class="src-sym">) </span>&gt; <span class="src-num">1 </span>&amp;&amp; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$basedir</span><span class="src-sym">,</span>-<span class="src-num">1</span><span class="src-sym">) </span>!= <span class="src-str">'/'</span><span class="src-sym">) </span><span class="src-sym">{ </span><span class="src-var">$basedir </span>.= <span class="src-str">'/'</span><span class="src-sym">; </span><span class="src-sym">}</span></li>
<li><a name="a1890"></a>          <span class="src-key">if </span><span class="src-sym">( </span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$directory</span><span class="src-sym">) </span>&gt; <span class="src-num">1 </span>&amp;&amp; <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$directory</span><span class="src-sym">,</span>-<span class="src-num">1</span><span class="src-sym">) </span>!= <span class="src-str">'/'</span><span class="src-sym">) </span><span class="src-sym">{ </span><span class="src-var">$directory </span>.= <span class="src-str">'/'</span><span class="src-sym">; </span><span class="src-sym">}</span></li>
<li><a name="a1891"></a>          <span class="src-key">if </span><span class="src-sym">( </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodAddEmbeddedImage">AddEmbeddedImage</a><span class="src-sym">(</span><span class="src-var">$basedir</span>.<span class="src-var">$directory</span>.<span class="src-var">$filename</span><span class="src-sym">, </span><a href="http://www.php.net/md5">md5</a><span class="src-sym">(</span><span class="src-var">$filename</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$filename</span><span class="src-sym">, </span><span class="src-str">'base64'</span><span class="src-sym">,</span><span class="src-var">$mimeType</span><span class="src-sym">) ) </span><span class="src-sym">{</span></li>
<li><a name="a1892"></a>            <span class="src-var">$message </span>= <a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">&quot;/&quot;</span>.<span class="src-var">$images</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span>.<span class="src-str">&quot;=\&quot;&quot;</span>.<a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-str">'/'</span><span class="src-sym">)</span>.<span class="src-str">&quot;\&quot;/Ui&quot;</span><span class="src-sym">, </span><span class="src-var">$images</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span>.<span class="src-str">&quot;=\&quot;&quot;</span>.<span class="src-var">$cid</span>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$message</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1893"></a>          <span class="src-sym">}</span></li>
<li><a name="a1894"></a>        <span class="src-sym">}</span></li>
<li><a name="a1895"></a>      <span class="src-sym">}</span></li>
<li><a name="a1896"></a>    <span class="src-sym">}</span></li>
<li><a name="a1897"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodIsHTML">IsHTML</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1898"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$Body">Body</a> = <span class="src-var">$message</span><span class="src-sym">;</span></li>
<li><a name="a1899"></a>    <span class="src-var">$textMsg </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><a href="http://www.php.net/strip_tags">strip_tags</a><span class="src-sym">(</span><a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/&lt;(head|title|style|script)[^&gt;]*&gt;.*?&lt;\/\\1&gt;/s'</span><span class="src-sym">,</span><span class="src-str">''</span><span class="src-sym">,</span><span class="src-var">$message</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a1900"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$textMsg</span><span class="src-sym">) </span>&amp;&amp; <span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1901"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a> = <a href="http://www.php.net/html_entity_decode">html_entity_decode</a><span class="src-sym">(</span><span class="src-var">$textMsg</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1902"></a>    <span class="src-sym">}</span></li>
<li><a name="a1903"></a>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a1904"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#var$AltBody">AltBody</a> = <span class="src-str">'To view this email message, open it in a program that understands HTML!' </span>. <span class="src-str">&quot;\n\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1905"></a>    <span class="src-sym">}</span></li>
<li><a name="a1906"></a>  <span class="src-sym">}</span></li>
<li><a name="a1907"></a>&nbsp;</li>
<li><a name="a1908"></a>  <span class="src-doc">/**</span></li>
<li><a name="a1909"></a><span class="src-doc">   * Gets the MIME type of the embedded or inline image</span></li>
<li><a name="a1910"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">File extension</span></li>
<li><a name="a1911"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a1912"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span><span class="src-doc">MIME type of ext</span></li>
<li><a name="a1913"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@static</span></li>
<li><a name="a1914"></a><span class="src-doc">   */</span></li>
<li><a name="a1915"></a>  <span class="src-key">public </span><span class="src-key">static </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#method_mime_types">_mime_types</a><span class="src-sym">(</span><span class="src-var">$ext </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a1916"></a>    <span class="src-var">$mimes </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a1917"></a>      <span class="src-str">'hqx'   </span>=&gt;  <span class="src-str">'application/mac-binhex40'</span><span class="src-sym">,</span></li>
<li><a name="a1918"></a>      <span class="src-str">'cpt'   </span>=&gt;  <span class="src-str">'application/mac-compactpro'</span><span class="src-sym">,</span></li>
<li><a name="a1919"></a>      <span class="src-str">'doc'   </span>=&gt;  <span class="src-str">'application/msword'</span><span class="src-sym">,</span></li>
<li><a name="a1920"></a>      <span class="src-str">'bin'   </span>=&gt;  <span class="src-str">'application/macbinary'</span><span class="src-sym">,</span></li>
<li><a name="a1921"></a>      <span class="src-str">'dms'   </span>=&gt;  <span class="src-str">'application/octet-stream'</span><span class="src-sym">,</span></li>
<li><a name="a1922"></a>      <span class="src-str">'lha'   </span>=&gt;  <span class="src-str">'application/octet-stream'</span><span class="src-sym">,</span></li>
<li><a name="a1923"></a>      <span class="src-str">'lzh'   </span>=&gt;  <span class="src-str">'application/octet-stream'</span><span class="src-sym">,</span></li>
<li><a name="a1924"></a>      <span class="src-str">'exe'   </span>=&gt;  <span class="src-str">'application/octet-stream'</span><span class="src-sym">,</span></li>
<li><a name="a1925"></a>      <span class="src-str">'class' </span>=&gt;  <span class="src-str">'application/octet-stream'</span><span class="src-sym">,</span></li>
<li><a name="a1926"></a>      <span class="src-str">'psd'   </span>=&gt;  <span class="src-str">'application/octet-stream'</span><span class="src-sym">,</span></li>
<li><a name="a1927"></a>      <span class="src-str">'so'    </span>=&gt;  <span class="src-str">'application/octet-stream'</span><span class="src-sym">,</span></li>
<li><a name="a1928"></a>      <span class="src-str">'sea'   </span>=&gt;  <span class="src-str">'application/octet-stream'</span><span class="src-sym">,</span></li>
<li><a name="a1929"></a>      <span class="src-str">'dll'   </span>=&gt;  <span class="src-str">'application/octet-stream'</span><span class="src-sym">,</span></li>
<li><a name="a1930"></a>      <span class="src-str">'oda'   </span>=&gt;  <span class="src-str">'application/oda'</span><span class="src-sym">,</span></li>
<li><a name="a1931"></a>      <span class="src-str">'pdf'   </span>=&gt;  <span class="src-str">'application/pdf'</span><span class="src-sym">,</span></li>
<li><a name="a1932"></a>      <span class="src-str">'ai'    </span>=&gt;  <span class="src-str">'application/postscript'</span><span class="src-sym">,</span></li>
<li><a name="a1933"></a>      <span class="src-str">'eps'   </span>=&gt;  <span class="src-str">'application/postscript'</span><span class="src-sym">,</span></li>
<li><a name="a1934"></a>      <span class="src-str">'ps'    </span>=&gt;  <span class="src-str">'application/postscript'</span><span class="src-sym">,</span></li>
<li><a name="a1935"></a>      <span class="src-str">'smi'   </span>=&gt;  <span class="src-str">'application/smil'</span><span class="src-sym">,</span></li>
<li><a name="a1936"></a>      <span class="src-str">'smil'  </span>=&gt;  <span class="src-str">'application/smil'</span><span class="src-sym">,</span></li>
<li><a name="a1937"></a>      <span class="src-str">'mif'   </span>=&gt;  <span class="src-str">'application/vnd.mif'</span><span class="src-sym">,</span></li>
<li><a name="a1938"></a>      <span class="src-str">'xls'   </span>=&gt;  <span class="src-str">'application/vnd.ms-excel'</span><span class="src-sym">,</span></li>
<li><a name="a1939"></a>      <span class="src-str">'ppt'   </span>=&gt;  <span class="src-str">'application/vnd.ms-powerpoint'</span><span class="src-sym">,</span></li>
<li><a name="a1940"></a>      <span class="src-str">'wbxml' </span>=&gt;  <span class="src-str">'application/vnd.wap.wbxml'</span><span class="src-sym">,</span></li>
<li><a name="a1941"></a>      <span class="src-str">'wmlc'  </span>=&gt;  <span class="src-str">'application/vnd.wap.wmlc'</span><span class="src-sym">,</span></li>
<li><a name="a1942"></a>      <span class="src-str">'dcr'   </span>=&gt;  <span class="src-str">'application/x-director'</span><span class="src-sym">,</span></li>
<li><a name="a1943"></a>      <span class="src-str">'dir'   </span>=&gt;  <span class="src-str">'application/x-director'</span><span class="src-sym">,</span></li>
<li><a name="a1944"></a>      <span class="src-str">'dxr'   </span>=&gt;  <span class="src-str">'application/x-director'</span><span class="src-sym">,</span></li>
<li><a name="a1945"></a>      <span class="src-str">'dvi'   </span>=&gt;  <span class="src-str">'application/x-dvi'</span><span class="src-sym">,</span></li>
<li><a name="a1946"></a>      <span class="src-str">'gtar'  </span>=&gt;  <span class="src-str">'application/x-gtar'</span><span class="src-sym">,</span></li>
<li><a name="a1947"></a>      <span class="src-str">'php'   </span>=&gt;  <span class="src-str">'application/x-httpd-php'</span><span class="src-sym">,</span></li>
<li><a name="a1948"></a>      <span class="src-str">'php4'  </span>=&gt;  <span class="src-str">'application/x-httpd-php'</span><span class="src-sym">,</span></li>
<li><a name="a1949"></a>      <span class="src-str">'php3'  </span>=&gt;  <span class="src-str">'application/x-httpd-php'</span><span class="src-sym">,</span></li>
<li><a name="a1950"></a>      <span class="src-str">'phtml' </span>=&gt;  <span class="src-str">'application/x-httpd-php'</span><span class="src-sym">,</span></li>
<li><a name="a1951"></a>      <span class="src-str">'phps'  </span>=&gt;  <span class="src-str">'application/x-httpd-php-source'</span><span class="src-sym">,</span></li>
<li><a name="a1952"></a>      <span class="src-str">'js'    </span>=&gt;  <span class="src-str">'application/x-javascript'</span><span class="src-sym">,</span></li>
<li><a name="a1953"></a>      <span class="src-str">'swf'   </span>=&gt;  <span class="src-str">'application/x-shockwave-flash'</span><span class="src-sym">,</span></li>
<li><a name="a1954"></a>      <span class="src-str">'sit'   </span>=&gt;  <span class="src-str">'application/x-stuffit'</span><span class="src-sym">,</span></li>
<li><a name="a1955"></a>      <span class="src-str">'tar'   </span>=&gt;  <span class="src-str">'application/x-tar'</span><span class="src-sym">,</span></li>
<li><a name="a1956"></a>      <span class="src-str">'tgz'   </span>=&gt;  <span class="src-str">'application/x-tar'</span><span class="src-sym">,</span></li>
<li><a name="a1957"></a>      <span class="src-str">'xhtml' </span>=&gt;  <span class="src-str">'application/xhtml+xml'</span><span class="src-sym">,</span></li>
<li><a name="a1958"></a>      <span class="src-str">'xht'   </span>=&gt;  <span class="src-str">'application/xhtml+xml'</span><span class="src-sym">,</span></li>
<li><a name="a1959"></a>      <span class="src-str">'zip'   </span>=&gt;  <span class="src-str">'application/zip'</span><span class="src-sym">,</span></li>
<li><a name="a1960"></a>      <span class="src-str">'mid'   </span>=&gt;  <span class="src-str">'audio/midi'</span><span class="src-sym">,</span></li>
<li><a name="a1961"></a>      <span class="src-str">'midi'  </span>=&gt;  <span class="src-str">'audio/midi'</span><span class="src-sym">,</span></li>
<li><a name="a1962"></a>      <span class="src-str">'mpga'  </span>=&gt;  <span class="src-str">'audio/mpeg'</span><span class="src-sym">,</span></li>
<li><a name="a1963"></a>      <span class="src-str">'mp2'   </span>=&gt;  <span class="src-str">'audio/mpeg'</span><span class="src-sym">,</span></li>
<li><a name="a1964"></a>      <span class="src-str">'mp3'   </span>=&gt;  <span class="src-str">'audio/mpeg'</span><span class="src-sym">,</span></li>
<li><a name="a1965"></a>      <span class="src-str">'aif'   </span>=&gt;  <span class="src-str">'audio/x-aiff'</span><span class="src-sym">,</span></li>
<li><a name="a1966"></a>      <span class="src-str">'aiff'  </span>=&gt;  <span class="src-str">'audio/x-aiff'</span><span class="src-sym">,</span></li>
<li><a name="a1967"></a>      <span class="src-str">'aifc'  </span>=&gt;  <span class="src-str">'audio/x-aiff'</span><span class="src-sym">,</span></li>
<li><a name="a1968"></a>      <span class="src-str">'ram'   </span>=&gt;  <span class="src-str">'audio/x-pn-realaudio'</span><span class="src-sym">,</span></li>
<li><a name="a1969"></a>      <span class="src-str">'rm'    </span>=&gt;  <span class="src-str">'audio/x-pn-realaudio'</span><span class="src-sym">,</span></li>
<li><a name="a1970"></a>      <span class="src-str">'rpm'   </span>=&gt;  <span class="src-str">'audio/x-pn-realaudio-plugin'</span><span class="src-sym">,</span></li>
<li><a name="a1971"></a>      <span class="src-str">'ra'    </span>=&gt;  <span class="src-str">'audio/x-realaudio'</span><span class="src-sym">,</span></li>
<li><a name="a1972"></a>      <span class="src-str">'rv'    </span>=&gt;  <span class="src-str">'video/vnd.rn-realvideo'</span><span class="src-sym">,</span></li>
<li><a name="a1973"></a>      <span class="src-str">'wav'   </span>=&gt;  <span class="src-str">'audio/x-wav'</span><span class="src-sym">,</span></li>
<li><a name="a1974"></a>      <span class="src-str">'bmp'   </span>=&gt;  <span class="src-str">'image/bmp'</span><span class="src-sym">,</span></li>
<li><a name="a1975"></a>      <span class="src-str">'gif'   </span>=&gt;  <span class="src-str">'image/gif'</span><span class="src-sym">,</span></li>
<li><a name="a1976"></a>      <span class="src-str">'jpeg'  </span>=&gt;  <span class="src-str">'image/jpeg'</span><span class="src-sym">,</span></li>
<li><a name="a1977"></a>      <span class="src-str">'jpg'   </span>=&gt;  <span class="src-str">'image/jpeg'</span><span class="src-sym">,</span></li>
<li><a name="a1978"></a>      <span class="src-str">'jpe'   </span>=&gt;  <span class="src-str">'image/jpeg'</span><span class="src-sym">,</span></li>
<li><a name="a1979"></a>      <span class="src-str">'png'   </span>=&gt;  <span class="src-str">'image/png'</span><span class="src-sym">,</span></li>
<li><a name="a1980"></a>      <span class="src-str">'tiff'  </span>=&gt;  <span class="src-str">'image/tiff'</span><span class="src-sym">,</span></li>
<li><a name="a1981"></a>      <span class="src-str">'tif'   </span>=&gt;  <span class="src-str">'image/tiff'</span><span class="src-sym">,</span></li>
<li><a name="a1982"></a>      <span class="src-str">'css'   </span>=&gt;  <span class="src-str">'text/css'</span><span class="src-sym">,</span></li>
<li><a name="a1983"></a>      <span class="src-str">'html'  </span>=&gt;  <span class="src-str">'text/html'</span><span class="src-sym">,</span></li>
<li><a name="a1984"></a>      <span class="src-str">'htm'   </span>=&gt;  <span class="src-str">'text/html'</span><span class="src-sym">,</span></li>
<li><a name="a1985"></a>      <span class="src-str">'shtml' </span>=&gt;  <span class="src-str">'text/html'</span><span class="src-sym">,</span></li>
<li><a name="a1986"></a>      <span class="src-str">'txt'   </span>=&gt;  <span class="src-str">'text/plain'</span><span class="src-sym">,</span></li>
<li><a name="a1987"></a>      <span class="src-str">'text'  </span>=&gt;  <span class="src-str">'text/plain'</span><span class="src-sym">,</span></li>
<li><a name="a1988"></a>      <span class="src-str">'log'   </span>=&gt;  <span class="src-str">'text/plain'</span><span class="src-sym">,</span></li>
<li><a name="a1989"></a>      <span class="src-str">'rtx'   </span>=&gt;  <span class="src-str">'text/richtext'</span><span class="src-sym">,</span></li>
<li><a name="a1990"></a>      <span class="src-str">'rtf'   </span>=&gt;  <span class="src-str">'text/rtf'</span><span class="src-sym">,</span></li>
<li><a name="a1991"></a>      <span class="src-str">'xml'   </span>=&gt;  <span class="src-str">'text/xml'</span><span class="src-sym">,</span></li>
<li><a name="a1992"></a>      <span class="src-str">'xsl'   </span>=&gt;  <span class="src-str">'text/xml'</span><span class="src-sym">,</span></li>
<li><a name="a1993"></a>      <span class="src-str">'mpeg'  </span>=&gt;  <span class="src-str">'video/mpeg'</span><span class="src-sym">,</span></li>
<li><a name="a1994"></a>      <span class="src-str">'mpg'   </span>=&gt;  <span class="src-str">'video/mpeg'</span><span class="src-sym">,</span></li>
<li><a name="a1995"></a>      <span class="src-str">'mpe'   </span>=&gt;  <span class="src-str">'video/mpeg'</span><span class="src-sym">,</span></li>
<li><a name="a1996"></a>      <span class="src-str">'qt'    </span>=&gt;  <span class="src-str">'video/quicktime'</span><span class="src-sym">,</span></li>
<li><a name="a1997"></a>      <span class="src-str">'mov'   </span>=&gt;  <span class="src-str">'video/quicktime'</span><span class="src-sym">,</span></li>
<li><a name="a1998"></a>      <span class="src-str">'avi'   </span>=&gt;  <span class="src-str">'video/x-msvideo'</span><span class="src-sym">,</span></li>
<li><a name="a1999"></a>      <span class="src-str">'movie' </span>=&gt;  <span class="src-str">'video/x-sgi-movie'</span><span class="src-sym">,</span></li>
<li><a name="a2000"></a>      <span class="src-str">'doc'   </span>=&gt;  <span class="src-str">'application/msword'</span><span class="src-sym">,</span></li>
<li><a name="a2001"></a>      <span class="src-str">'word'  </span>=&gt;  <span class="src-str">'application/msword'</span><span class="src-sym">,</span></li>
<li><a name="a2002"></a>      <span class="src-str">'xl'    </span>=&gt;  <span class="src-str">'application/excel'</span><span class="src-sym">,</span></li>
<li><a name="a2003"></a>      <span class="src-str">'eml'   </span>=&gt;  <span class="src-str">'message/rfc822'</span></li>
<li><a name="a2004"></a>    <span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a2005"></a>    <span class="src-key">return </span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$mimes</span><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$ext</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">)) </span>? <span class="src-str">'application/octet-stream' </span>: <span class="src-var">$mimes</span><span class="src-sym">[</span><a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$ext</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a2006"></a>  <span class="src-sym">}</span></li>
<li><a name="a2007"></a>&nbsp;</li>
<li><a name="a2008"></a>  <span class="src-doc">/**</span></li>
<li><a name="a2009"></a><span class="src-doc">  * Set (or reset) Class Objects (variables)</span></li>
<li><a name="a2010"></a><span class="src-doc">  *</span></li>
<li><a name="a2011"></a><span class="src-doc">  * Usage Example:</span></li>
<li><a name="a2012"></a><span class="src-doc">  * $page-&gt;set('X-Priority', '3');</span></li>
<li><a name="a2013"></a><span class="src-doc">  *</span></li>
<li><a name="a2014"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a2015"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$name </span><span class="src-doc">Parameter Name</span></li>
<li><a name="a2016"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$value </span><span class="src-doc">Parameter Value</span></li>
<li><a name="a2017"></a><span class="src-doc">  *  NOTE: will not work with arrays, there are no arrays to set/reset</span></li>
<li><a name="a2018"></a><span class="src-doc">  * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Should this not be using __set() magic function?</span></li>
<li><a name="a2019"></a><span class="src-doc">  */</span></li>
<li><a name="a2020"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodset">set</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value </span>= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a2021"></a>    try <span class="src-sym">{</span></li>
<li><a name="a2022"></a>      <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">$name</span><span class="src-sym">) ) </span><span class="src-sym">{</span></li>
<li><a name="a2023"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">$name </span>= <span class="src-var">$value</span><span class="src-sym">;</span></li>
<li><a name="a2024"></a>      <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a2025"></a>        throw <span class="src-key">new </span><span class="src-id"><a href="../PHPMailer/phpmailerException.html">phpmailerException</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">Lang</span><span class="src-sym">(</span><span class="src-str">'variable_set'</span><span class="src-sym">) </span>. <span class="src-var">$name</span><span class="src-sym">, </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a2026"></a>      <span class="src-sym">}</span></li>
<li><a name="a2027"></a>    <span class="src-sym">} </span>catch <span class="src-sym">(</span><span class="src-id">Exception </span><span class="src-var">$e</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a2028"></a>      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPMailer/PHPMailer.html#methodSetError">SetError</a><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-&gt;</span><span class="src-id">getMessage</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a2029"></a>      <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-&gt;</span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>== <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">STOP_CRITICAL</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a2030"></a>        <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a2031"></a>      <span class="src-sym">}</span></li>
<li><a name="a2032"></a>    <span class="src-sym">}</span></li>
<li><a name="a2033"></a>    <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a2034"></a>  <span class="src-sym">}</span></li>
<li><a name="a2035"></a>&nbsp;</li>
<li><a name="a2036"></a>  <span class="src-doc">/**</span></li>
<li><a name="a2037"></a><span class="src-doc">   * Strips newlines to prevent header injection.</span></li>
<li><a name="a2038"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a2039"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$str </span><span class="src-doc">String</span></li>
<li><a name="a2040"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a2041"></a><span class="src-doc">   */</span></li>
<li><a name="a2042"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSecureHeader">SecureHeader</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a2043"></a>    <span class="src-var">$str </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\r&quot;</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a2044"></a>    <span class="src-var">$str </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a2045"></a>    <span class="src-key">return </span><a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a2046"></a>  <span class="src-sym">}</span></li>
<li><a name="a2047"></a>&nbsp;</li>
<li><a name="a2048"></a>  <span class="src-doc">/**</span></li>
<li><a name="a2049"></a><span class="src-doc">   * Set the private key file and password to sign the message.</span></li>
<li><a name="a2050"></a><span class="src-doc">   *</span></li>
<li><a name="a2051"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a2052"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key_filename </span><span class="src-doc">Parameter File Name</span></li>
<li><a name="a2053"></a><span class="src-doc">   * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key_pass </span><span class="src-doc">Password for private key</span></li>
<li><a name="a2054"></a><span class="src-doc">   */</span></li>
<li><a name="a2055"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/PHPMailer.html#methodSign">Sign</a><span class="src-sym">(</span><span class="src-var">$cert_filename</span><span class="src-sym">, </span><span class="src-var">$key_filename</span><span class="src-sym">, </span><span class="src-var">$key_pass</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a2056"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">sign_cert_file </span>= <span class="src-var">$cert_filename</span><span class="src-sym">;</span></li>
<li><a name="a2057"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">sign_key_file </span>= <span class="src-var">$key_filename</span><span class="src-sym">;</span></li>
<li><a name="a2058"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">sign_key_pass </span>= <span class="src-var">$key_pass</span><span class="src-sym">;</span></li>
<li><a name="a2059"></a>  <span class="src-sym">}</span></li>
<li><a name="a2060"></a><span class="src-sym">}</span></li>
<li><a name="a2061"></a>&nbsp;</li>
<li><a name="a2062"></a><span class="src-key">class </span><a href="../PHPMailer/phpmailerException.html">phpmailerException</a> <span class="src-key">extends </span><span class="src-id">Exception </span><span class="src-sym">{</span></li>
<li><a name="a2063"></a>  <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPMailer/phpmailerException.html#methoderrorMessage">errorMessage</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a2064"></a>    <span class="src-var">$errorMsg </span>= <span class="src-str">'&lt;strong&gt;' </span>. <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">getMessage</span><span class="src-sym">(</span><span class="src-sym">) </span>. <span class="src-str">&quot;&lt;/strong&gt;&lt;br /&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a2065"></a>    <span class="src-key">return </span><span class="src-var">$errorMsg</span><span class="src-sym">;</span></li>
<li><a name="a2066"></a>  <span class="src-sym">}</span></li>
<li><a name="a2067"></a><span class="src-sym">}</span></li>
<li><a name="a2068"></a><span class="src-php">?&gt;</span></li>
</ol></pre>
</div>
	<p class="notes" id="credit">
		Documentation generated on Thu, 02 Apr 2009 17:51:25 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</body>
</html>